Split release pipeline into remote and local image builds

Matrix strategy builds both targets in parallel. Tags follow the
pattern: v0.3.0-remote, v0.3.0-local, latest-remote, latest-local.
This commit is contained in:
Pier-Jean Malandrino 2026-04-02 21:41:04 +02:00
parent 9ac0840607
commit 3dd7470562

View file

@ -1,4 +1,4 @@
name: Release Docker Image
name: Release Docker Images
on:
push:
@ -11,12 +11,16 @@ env:
jobs:
release:
name: Build & push Docker image
name: Build & push — ${{ matrix.target }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
target: [remote, local]
steps:
- uses: actions/checkout@v4
@ -28,15 +32,15 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version from tag
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest
type=semver,pattern={{version}},suffix=-${{ matrix.target }}
type=semver,pattern={{major}}.{{minor}},suffix=-${{ matrix.target }}
type=raw,value=latest-${{ matrix.target }}
- name: Extract version from tag
id: version
@ -45,6 +49,7 @@ jobs:
- uses: docker/build-push-action@v6
with:
context: .
target: ${{ matrix.target }}
push: true
platforms: linux/amd64,linux/arm64
build-args: APP_VERSION=${{ steps.version.outputs.value }}