mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-24 13:44:58 +00:00
upgrade workflow
This commit is contained in:
3
.github/workflows/package-release.yml
vendored
3
.github/workflows/package-release.yml
vendored
@@ -4,7 +4,7 @@ on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
@@ -35,7 +35,6 @@ jobs:
|
||||
with:
|
||||
name: build-${{ matrix.platform }}-${{ matrix.arch }}
|
||||
path: .
|
||||
run-id: ${{ github.run_id }}
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
|
||||
24
.github/workflows/publish-container.yml
vendored
24
.github/workflows/publish-container.yml
vendored
@@ -29,6 +29,9 @@ jobs:
|
||||
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:
|
||||
@@ -37,13 +40,14 @@ jobs:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and publish container image
|
||||
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 }} .
|
||||
IMAGE=ghcr.io/${{ github.repository_owner }}/sdl3_app:${{ matrix.platform }}-${{ matrix.arch }}
|
||||
docker tag sdl3_app:${{ matrix.platform }}-${{ matrix.arch }} "$IMAGE"
|
||||
docker push "$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
|
||||
|
||||
7
.github/workflows/upload-build-artifact.yml
vendored
7
.github/workflows/upload-build-artifact.yml
vendored
@@ -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 \
|
||||
docker buildx build \
|
||||
--platform linux/${{ matrix.arch }} \
|
||||
--load \
|
||||
--build-arg USERNAME=builder \
|
||||
--build-arg UID=$(id -u) \
|
||||
--build-arg GID=$(id -g) \
|
||||
|
||||
Reference in New Issue
Block a user