-
-
Notifications
You must be signed in to change notification settings - Fork 279
52 lines (49 loc) · 1.76 KB
/
build-xemu-win64-toolchain.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build xemu-win64-toolchain
on:
push:
paths:
- '.github/workflows/build-xemu-win64-toolchain.yml'
- 'ubuntu-win64-cross/**'
pull_request:
paths:
- '.github/workflows/build-xemu-win64-toolchain.yml'
- 'ubuntu-win64-cross/**'
env:
REGISTRY: ghcr.io
IMAGE_NAME: xemu-project/xemu-win64-toolchain
jobs:
build-image:
name: Build and Publish Image
if: github.repository_owner == 'xemu-project'
runs-on: ubuntu-latest
steps:
- name: Clone tree
uses: actions/checkout@v4
- name: Extract image metadata (tags, labels)
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: |
org.opencontainers.image.title=xemu-win64-toolchain
org.opencontainers.image.description=Toolchain and libraries for building xemu Windows releases
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=ref,event=branch
type=sha
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/[email protected]
with:
context: ubuntu-win64-cross
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}