Files
xemu/.github/workflows/build-xemu-win64-toolchain.yml
2026-01-10 00:10:44 -07:00

58 lines
2.2 KiB
YAML

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
jobs:
build-image:
name: Build and Publish Image
if: ${{ github.repository_owner == 'xemu-project' }}
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [llvm, gcc]
env:
IMAGE_NAME: xemu-project/xemu-win64-toolchain-${{ matrix.toolchain }}
steps:
- name: Clone tree
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
- name: Extract image metadata (tags, labels)
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: |
org.opencontainers.image.title=xemu-win64-toolchain-${{ matrix.toolchain }}
org.opencontainers.image.description=${{ matrix.toolchain }} 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/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Login to GitHub Container Registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
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/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v5
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 }}
file: ubuntu-win64-cross/${{ matrix.toolchain }}.Dockerfile