From 3dd7470562b0c776936d9592519b80e080698b41 Mon Sep 17 00:00:00 2001 From: Pier-Jean Malandrino Date: Thu, 2 Apr 2026 21:41:04 +0200 Subject: [PATCH] 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. --- .github/workflows/release.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9066a50..a50c6ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }}