Skip to content

Commit

Permalink
add build for fork
Browse files Browse the repository at this point in the history
  • Loading branch information
rinsuki committed Oct 9, 2024
1 parent a1c415a commit 6cb3c77
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6cb3c77

Please sign in to comment.