Update workflow.patch

This commit is contained in:
2025-12-19 19:29:17 +00:00
committed by GitHub
parent fd7b19a19a
commit 26c0e1b0e9

View File

@@ -1,9 +1,8 @@
diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml
index 0000000..0000000 100644
index 518ddf2..1c0e350 100644
--- a/.github/workflows/package-release.yml
+++ b/.github/workflows/package-release.yml
@@ -3,13 +3,13 @@ name: Package Release
on:
@@ -4,7 +4,7 @@ on:
workflow_call:
permissions:
@@ -12,30 +11,7 @@ index 0000000..0000000 100644
packages: write
jobs:
package-release:
strategy:
fail-fast: false
matrix:
include:
- name: linux-amd64
runner: ubuntu-24.04
platform: linux
arch: amd64
- name: linux-arm64
runner: ubuntu-24.04-arm64
platform: linux
arch: arm64
runs-on: ${{ matrix.runner }}
env:
BUILD_DIR: build/${{ matrix.platform }}-${{ matrix.arch }}
ZIP_NAME: sdl3_app-${{ matrix.platform }}-${{ matrix.arch }}.zip
PLATFORM_NAME: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download build artifact
uses: actions/download-artifact@v4
@@ -35,7 +35,6 @@ jobs:
with:
name: build-${{ matrix.platform }}-${{ matrix.arch }}
path: .
@@ -43,52 +19,11 @@ index 0000000..0000000 100644
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Package release ZIP
run: python scripts/package_release.py
- name: Publish GitHub release asset
if: github.ref != 'refs/tags/local'
uses: softprops/action-gh-release@v1
with:
files: release/${{ env.ZIP_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/publish-container.yml b/.github/workflows/publish-container.yml
index 0000000..0000000 100644
index c88b120..172af16 100644
--- a/.github/workflows/publish-container.yml
+++ b/.github/workflows/publish-container.yml
@@ -1,49 +1,60 @@
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
@@ -29,6 +29,9 @@ jobs:
with:
platforms: linux/amd64,linux/arm64
@@ -98,11 +33,10 @@ index 0000000..0000000 100644
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
@@ -37,13 +40,14 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- - name: Build and publish container image
- name: Build and publish container image
- run: |
- docker build \
- --build-arg USERNAME=builder \
@@ -113,7 +47,6 @@ index 0000000..0000000 100644
- IMAGE=ghcr.io/${{ github.repository_owner }}/sdl3_app:${{ matrix.platform }}-${{ matrix.arch }}
- docker tag sdl3_app:${{ matrix.platform }}-${{ matrix.arch }} "$IMAGE"
- docker push "$IMAGE"
+ - name: Build and publish container image
+ uses: docker/build-push-action@v5
+ with:
+ context: .
@@ -126,81 +59,23 @@ index 0000000..0000000 100644
+ UID=1000
+ GID=1000
diff --git a/.github/workflows/upload-build-artifact.yml b/.github/workflows/upload-build-artifact.yml
index 0000000..0000000 100644
index d6135e2..1ee901c 100644
--- a/.github/workflows/upload-build-artifact.yml
+++ b/.github/workflows/upload-build-artifact.yml
@@ -1,63 +1,73 @@
name: Upload Build Artifacts
on:
workflow_call:
permissions:
contents: write
jobs:
upload-artifact:
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
env:
BUILD_DIR: build/${{ matrix.platform }}-${{ matrix.arch }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
@@ -30,10 +30,15 @@ jobs:
with:
platforms: linux/amd64,linux/arm64
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
- name: Build linux container image
if: matrix.platform == 'linux'
run: |
- docker build \
- --build-arg USERNAME=builder \
- --build-arg UID=$(id -u) \
- --build-arg GID=$(id -g) \
- -f .github/workflows/Dockerfile \
- -t sdl3_app:${{ matrix.platform }}-${{ matrix.arch }} .
+ docker buildx build \
+ --platform linux/${{ matrix.arch }} \
+ --load \
+ --build-arg USERNAME=builder \
+ --build-arg UID=$(id -u) \
+ --build-arg GID=$(id -g) \
+ -f .github/workflows/Dockerfile \
+ -t sdl3_app:${{ matrix.platform }}-${{ matrix.arch }} .
- name: Run linux build in container
if: matrix.platform == 'linux'
env:
BUILD_DIR: ${{ env.BUILD_DIR }}
run: |
docker run --rm \
-e BUILD_DIR \
-w /workspace \
-v "${{ github.workspace }}:/workspace" \
sdl3_app:${{ matrix.platform }}-${{ matrix.arch }} \
bash -c 'set -euo pipefail
if [ -d "$BUILD_DIR" ]; then rm -rf "$BUILD_DIR"; fi
cp -a /conan_build "$BUILD_DIR"
cmake -S . -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE=Release
cmake --build "$BUILD_DIR" --config Release'
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.platform }}-${{ matrix.arch }}
path: ${{ env.BUILD_DIR }}
--build-arg USERNAME=builder \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \