mirror of https://github.com/xemu-project/xemu.git
53 lines
1.8 KiB
YAML
53 lines
1.8 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
|
|
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/metadata-action@v5
|
|
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/setup-buildx-action@v3
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@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@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 }}
|