mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-24 13:44:58 +00:00
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Publish Container Image
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
publish-image:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: linux-amd64
|
|
platform: linux
|
|
arch: amd64
|
|
- name: linux-arm64
|
|
platform: linux
|
|
arch: arm64
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
with:
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and publish container image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: .github/workflows/Dockerfile
|
|
push: true
|
|
platforms: linux/${{ matrix.arch }}
|
|
tags: ghcr.io/${{ github.repository_owner }}/sdl3_app:${{ matrix.platform }}-${{ matrix.arch }}
|
|
build-args: |
|
|
USERNAME=builder
|
|
UID=1000
|
|
GID=1000
|