multiple runner publish

This commit is contained in:
Benjamin Brummer
2025-10-20 21:45:11 +02:00
parent ea252c7891
commit 98f60d721c

View File

@@ -10,12 +10,15 @@ env:
jobs: jobs:
build: build:
runs-on: ${{ startsWith(matrix.platforms, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} runs-on: ${{ startsWith(matrix.platform, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
outputs:
tags: ${{ steps.prep.outputs.tags }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
platform: ["linux/amd64", "linux/arm64"] platform:
- linux/amd64
- linux/arm64
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v5
@@ -63,14 +66,15 @@ jobs:
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Build and push by digest - name: Build and push by digest
id: docker_build id: build
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: debian context: debian
build-args: INVOICENINJA_VERSION=${{ steps.prep.outputs.version }} build-args: INVOICENINJA_VERSION=${{ steps.prep.outputs.version }}
push: ${{ github.event_name != 'pull_request' }} platforms: ${{ matrix.platform }}
tags: ${{ steps.prep.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,push-by-digest=true,name-canonical=true tags: ${{ env.REGISTRY_IMAGE }}
outputs: type=image,push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
@@ -115,10 +119,7 @@ jobs:
with: with:
images: ${{ env.REGISTRY_IMAGE }} images: ${{ env.REGISTRY_IMAGE }}
tags: | tags: |
type=ref,event=branch ${{ needs.build.outputs.tags }}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Create manifest list and push - name: Create manifest list and push
working-directory: ${{ runner.temp }}/digests working-directory: ${{ runner.temp }}/digests
@@ -128,12 +129,15 @@ jobs:
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image - name: Inspect image
if: ${{ github.event_name != 'pull_request' }}
run: | run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
Description: Description:
if: ${{ github.event_name != 'pull_request' }} if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs:
- merge
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v5