From 6cb3c775f4fad136cd18d2a2fb53bc9bccfcee50 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Wed, 9 Oct 2024 10:33:09 +0900 Subject: [PATCH] add build for fork --- .github/workflows/build-image.yml | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/build-image.yml diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml new file mode 100644 index 00000000000000..0b632757257042 --- /dev/null +++ b/.github/workflows/build-image.yml @@ -0,0 +1,45 @@ +name: Build container image +on: + workflow_dispatch: + push: + branches: + - 'stable-4.2-rinsuki' + tags: + - '*' + pull_request: + paths: + - .github/workflows/build-image.yml + - Dockerfile + +permissions: + contents: read + packages: write + +jobs: + compute-suffix: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - id: version_vars + env: + TZ: Etc/UTC + run: | + echo version_metadata=rinsuki.$(git show --format='%h' --no-patch)>> $GITHUB_OUTPUT + outputs: + version_metadata: ${{ steps.version_vars.outputs.version_metadata }} + + build-image: + needs: compute-suffix + uses: ./.github/workflows/build-container-image.yml + with: + platforms: linux/amd64,linux/arm64 + use_native_arm64_builder: false + cache: true + push_to_images: | + ghcr.io/${{ github.repository }} + version_metadata: ${{ needs.compute-suffix.outputs.version_metadata }} + flavor: | + latest=false + tags: | + type=sha,format=long + secrets: inherit