From 212c996dd2ed7028e3fc95a5ff8dd8b4a29e7adf Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sat, 28 Mar 2026 23:58:37 +0100 Subject: [PATCH 01/15] try again to have only relevant Assets for a release --- .github/workflows/create-release.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 669cca1b..d3842644 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -166,6 +166,19 @@ jobs: path: all-assets merge-multiple: true + - name: Collect release assets + run: | + mkdir -p release-assets + find all-assets -type f \( + -name '*.tar.gz' -o \ + -name '*.exe' -o \ + -name '*.dmg' -o \ + -name '*.AppImage' -o \ + -name '*.zip' + \) -exec cp {} release-assets/ \; + echo "Release asset candidates:" + ls -la release-assets + - name: Create GitHub Release uses: ncipollo/release-action@v1 with: @@ -176,6 +189,6 @@ jobs: prerelease: ${{ github.event.inputs.prerelease }} commit: ${{ github.ref_name }} token: ${{ secrets.GITHUB_TOKEN }} - artifacts: "all-assets/**/*.{tar.gz,exe,dmg,AppImage,zip}" + artifacts: "release-assets/*" allowUpdates: true replacesArtifacts: true From ba4f479b9cbaacc7cb84bf483188a70d62d371c6 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 00:07:39 +0100 Subject: [PATCH 02/15] additional try --- .github/workflows/create-release.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index d3842644..9c40b00d 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -169,13 +169,7 @@ jobs: - name: Collect release assets run: | mkdir -p release-assets - find all-assets -type f \( - -name '*.tar.gz' -o \ - -name '*.exe' -o \ - -name '*.dmg' -o \ - -name '*.AppImage' -o \ - -name '*.zip' - \) -exec cp {} release-assets/ \; + find all-assets -type f \( -name '*.tar.gz' -o -name '*.exe' -o -name '*.dmg' -o -name '*.AppImage' -o -name '*.zip' \) -exec cp {} release-assets/ \; echo "Release asset candidates:" ls -la release-assets From bfecb8b816a3889ef6689be82e4f50342c8e5956 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 00:19:37 +0100 Subject: [PATCH 03/15] Provide one relevant *.exe --- .github/workflows/create-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 9c40b00d..f3d9a81b 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -169,7 +169,7 @@ jobs: - name: Collect release assets run: | mkdir -p release-assets - find all-assets -type f \( -name '*.tar.gz' -o -name '*.exe' -o -name '*.dmg' -o -name '*.AppImage' -o -name '*.zip' \) -exec cp {} release-assets/ \; + find all-assets -type f \( -name '*.tar.gz' -o -name '*Setup*.exe' -o -name '*.dmg' -o -name '*.AppImage' -o -name '*.zip' \) -exec cp {} release-assets/ \; echo "Release asset candidates:" ls -la release-assets From 52897ad75b1d80d37d63a37b2575063da7e742d0 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 00:31:22 +0100 Subject: [PATCH 04/15] only publish final applications --- .github/workflows/create-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index f3d9a81b..c897d008 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -169,7 +169,8 @@ jobs: - name: Collect release assets run: | mkdir -p release-assets - find all-assets -type f \( -name '*.tar.gz' -o -name '*Setup*.exe' -o -name '*.dmg' -o -name '*.AppImage' -o -name '*.zip' \) -exec cp {} release-assets/ \; + # Keep only final application installer artifacts, not intermediate backend-only packages + find all-assets -type f \( -name '*Setup*.exe' -o -name '*.AppImage' -o -name '*.dmg' -o -name '*.zip' \) -exec cp {} release-assets/ \; echo "Release asset candidates:" ls -la release-assets From d00b78a4bcab6f4e9948bb9b92f1ea4ab131c093 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 00:42:44 +0100 Subject: [PATCH 05/15] try to fix package creation --- .github/workflows/build-docker.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index a8818fda..dedcd15c 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -2,8 +2,9 @@ name: Build Docker Image on: release: - # Run this workflow when a release or pre-release is published - types: [published, released, prereleased] + # Run this workflow when a release is created/published/prereleased + # `ncipollo/release-action` sometimes emits `created` first, so include it. + types: [created, published, prereleased] env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true From 972c88a1e40a7e9b9083ec57ef424f7be13e3d4b Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 01:03:49 +0100 Subject: [PATCH 06/15] try to fix Docker build and remove node version warnings --- .github/workflows/build-docker.yml | 5 ++++- .github/workflows/create-release.yml | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index dedcd15c..4dea913e 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -5,9 +5,12 @@ on: # Run this workflow when a release is created/published/prereleased # `ncipollo/release-action` sometimes emits `created` first, so include it. types: [created, published, prereleased] + workflow_run: + workflows: ["Create Release (manual)"] + types: + - completed env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index c897d008..e7048b29 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -21,7 +21,6 @@ permissions: contents: write env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true RELEASE_VERSION: ${{ github.event.inputs.version }} jobs: From 2e899ef5259141f854a9e71c7dd8098e08cd18d6 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 01:14:32 +0100 Subject: [PATCH 07/15] update Actions versions --- .github/workflows/build-docker.yml | 2 +- .github/workflows/code-quality.yml | 8 +++---- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/create-release.yml | 30 ++++++++++++------------- .github/workflows/dependency-review.yml | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 4dea913e..20e53509 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Log in to the Container registry uses: docker/login-action@v3 diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index abf7b146..a67c3afe 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -10,9 +10,9 @@ jobs: backend-checks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.12' - name: Install dependencies @@ -36,9 +36,9 @@ jobs: frontend-checks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: '24' cache: 'npm' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 724bf604..5319486a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index e7048b29..21b1a139 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Ensure workflow is running on allowed branches run: | @@ -46,13 +46,13 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: '24' - name: Install dependencies @@ -72,7 +72,7 @@ jobs: tar -czf dist/release/backend-onedir-${{ runner.os }}.tar.gz -C dist run_app - name: Upload Backend Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: backend-onedir-${{ runner.os }} path: dist/release/backend-onedir-${{ runner.os }}.tar.gz @@ -84,13 +84,13 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: '24' - name: Download Backend Artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 with: name: backend-onedir-${{ runner.os }} path: dist/run_app @@ -109,7 +109,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload Electron Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: electron-assets-${{ runner.os }} path: | @@ -127,13 +127,13 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: '24' - name: Install dependencies @@ -147,7 +147,7 @@ jobs: - name: Build Backend (onefile) run: python build_backend.py onefile - name: Upload Onefile Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: backend-onefile-${{ runner.os }} path: dist/AugmentedQuill* @@ -157,10 +157,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Download all artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 with: path: all-assets merge-multiple: true diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 4f80c9d5..bb8ee13e 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -15,7 +15,7 @@ jobs: pull-requests: write steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Dependency review uses: actions/dependency-review-action@v4 From 65c919c288c96d00fcbc071ce1830ef84d55e257 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 01:25:39 +0100 Subject: [PATCH 08/15] try t oremove node version warnings --- .github/workflows/create-release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 21b1a139..067aaf0e 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -72,7 +72,7 @@ jobs: tar -czf dist/release/backend-onedir-${{ runner.os }}.tar.gz -C dist run_app - name: Upload Backend Artifact - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: backend-onedir-${{ runner.os }} path: dist/release/backend-onedir-${{ runner.os }}.tar.gz @@ -90,7 +90,7 @@ jobs: with: node-version: '24' - name: Download Backend Artifact - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v8 with: name: backend-onedir-${{ runner.os }} path: dist/run_app @@ -109,7 +109,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload Electron Artifact - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: electron-assets-${{ runner.os }} path: | @@ -147,7 +147,7 @@ jobs: - name: Build Backend (onefile) run: python build_backend.py onefile - name: Upload Onefile Artifact - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: backend-onefile-${{ runner.os }} path: dist/AugmentedQuill* @@ -160,7 +160,7 @@ jobs: uses: actions/checkout@v6 - name: Download all artifacts - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v8 with: path: all-assets merge-multiple: true From 55dbdafa33a2c0eaf7ba780aa9702d7ea93a2e73 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 14:16:47 +0200 Subject: [PATCH 09/15] Better Docker tag handling --- .github/workflows/build-docker.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 20e53509..d514c4e2 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -37,6 +37,14 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=sha + type=raw,value=latest,enable=${{ github.event_name == 'release' || (github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'main') }} + type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }} - name: Build and push Docker image uses: docker/build-push-action@v6 From 1690a24fb8e648f1e09edf9506a8e436c02326a0 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 15:06:46 +0200 Subject: [PATCH 10/15] try better Docker tag handling --- .github/workflows/build-docker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index d514c4e2..1076bbef 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -45,9 +45,10 @@ jobs: type=sha type=raw,value=latest,enable=${{ github.event_name == 'release' || (github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'main') }} type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }} + type=raw,value=${{ github.event.workflow_run.event == 'workflow_dispatch' && contains(github.event.workflow_run.name, 'Create Release') && 'manual-release' || '' }},enable=${{ github.event_name == 'workflow_run' }} - name: Build and push Docker image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: context: . push: ${{ github.event_name != 'pull_request' }} From 56eb6f7ac868391e77aaa0ecfaa72810f2fd1042 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 15:22:59 +0200 Subject: [PATCH 11/15] next try for better Docker tags --- .github/workflows/build-docker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 1076bbef..361b0e9a 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v6 - name: Log in to the Container registry - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -34,7 +34,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | @@ -45,7 +45,7 @@ jobs: type=sha type=raw,value=latest,enable=${{ github.event_name == 'release' || (github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'main') }} type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }} - type=raw,value=${{ github.event.workflow_run.event == 'workflow_dispatch' && contains(github.event.workflow_run.name, 'Create Release') && 'manual-release' || '' }},enable=${{ github.event_name == 'workflow_run' }} + type=raw,value=${{ github.event.workflow_run.event == 'workflow_dispatch' && github.event.workflow_run.head_commit.message || 'manual-release' }},enable=${{ github.event_name == 'workflow_run' && contains(github.event.workflow_run.name, 'Create Release') }} - name: Build and push Docker image uses: docker/build-push-action@v7 From a514bdf41bce84dd2673ae0c29f61cc3304811b5 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 16:05:02 +0200 Subject: [PATCH 12/15] trying again --- .github/workflows/build-docker.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 361b0e9a..1d5c61b5 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -38,19 +38,15 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=sha - type=raw,value=latest,enable=${{ github.event_name == 'release' || (github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'main') }} + type=raw,value=latest type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }} - type=raw,value=${{ github.event.workflow_run.event == 'workflow_dispatch' && github.event.workflow_run.head_commit.message || 'manual-release' }},enable=${{ github.event_name == 'workflow_run' && contains(github.event.workflow_run.name, 'Create Release') }} - name: Build and push Docker image uses: docker/build-push-action@v7 with: context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + ${{ github.event_name == 'release' && format('{0}/{1}:{2}', env.REGISTRY, env.IMAGE_NAME, github.event.release.tag_name) || '' }} labels: ${{ steps.meta.outputs.labels }} From f719fbd8f728ec0b4c40f1ce519db4ebad4b2e66 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 16:26:24 +0200 Subject: [PATCH 13/15] next try, lower case --- .github/workflows/build-docker.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 1d5c61b5..4b5ca855 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -25,6 +25,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 + - name: Lowercase image name + run: | + echo "IMAGE_NAME_LOWER=$(echo "${{ env.IMAGE_NAME }}" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV + - name: Log in to the Container registry uses: docker/login-action@v4 with: @@ -36,7 +40,7 @@ jobs: id: meta uses: docker/metadata-action@v6 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }} tags: | type=raw,value=latest type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }} @@ -47,6 +51,6 @@ jobs: context: . push: true tags: | - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest - ${{ github.event_name == 'release' && format('{0}/{1}:{2}', env.REGISTRY, env.IMAGE_NAME, github.event.release.tag_name) || '' }} + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}:latest + ${{ github.event_name == 'release' && format('{0}/{1}:{2}', env.REGISTRY, env.IMAGE_NAME_LOWER, github.event.release.tag_name) || '' }} labels: ${{ steps.meta.outputs.labels }} From 111aefefb650f26f604e984b6edc2b3b481cedd5 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 16:42:34 +0200 Subject: [PATCH 14/15] try again --- .github/workflows/build-docker.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 4b5ca855..0b164899 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -2,13 +2,8 @@ name: Build Docker Image on: release: - # Run this workflow when a release is created/published/prereleased - # `ncipollo/release-action` sometimes emits `created` first, so include it. - types: [created, published, prereleased] - workflow_run: - workflows: ["Create Release (manual)"] - types: - - completed + # Use the release tag as the single source of truth for published image tags. + types: [published, prereleased] env: REGISTRY: ghcr.io @@ -16,6 +11,7 @@ env: jobs: build-and-push-image: + if: ${{ github.event.release.tag_name != '' }} runs-on: ubuntu-latest permissions: contents: read @@ -25,9 +21,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 - - name: Lowercase image name + - name: Prepare image name + id: image run: | - echo "IMAGE_NAME_LOWER=$(echo "${{ env.IMAGE_NAME }}" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV + IMAGE_NAME_LOWER="$(echo "${{ env.IMAGE_NAME }}" | tr '[:upper:]' '[:lower:]')" + echo "name=${IMAGE_NAME_LOWER}" >> "$GITHUB_OUTPUT" + echo "uri=${{ env.REGISTRY }}/${IMAGE_NAME_LOWER}" >> "$GITHUB_OUTPUT" - name: Log in to the Container registry uses: docker/login-action@v4 @@ -40,7 +39,7 @@ jobs: id: meta uses: docker/metadata-action@v6 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }} + images: ${{ steps.image.outputs.uri }} tags: | type=raw,value=latest type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }} @@ -51,6 +50,6 @@ jobs: context: . push: true tags: | - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}:latest - ${{ github.event_name == 'release' && format('{0}/{1}:{2}', env.REGISTRY, env.IMAGE_NAME_LOWER, github.event.release.tag_name) || '' }} + ${{ steps.image.outputs.uri }}:latest + ${{ steps.image.outputs.uri }}:${{ github.event.release.tag_name }} labels: ${{ steps.meta.outputs.labels }} From 43c00e74bc49219ade39e00a0ff9eefff431b340 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Sun, 29 Mar 2026 16:52:48 +0200 Subject: [PATCH 15/15] Next try to build Docker package --- .github/workflows/build-docker.yml | 21 ++++++++++++++++++--- .github/workflows/create-release.yml | 10 ++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 0b164899..8b92e865 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -1,6 +1,12 @@ name: Build Docker Image on: + workflow_call: + inputs: + version: + description: Docker image tag to publish alongside latest. + required: true + type: string release: # Use the release tag as the single source of truth for published image tags. types: [published, prereleased] @@ -11,7 +17,6 @@ env: jobs: build-and-push-image: - if: ${{ github.event.release.tag_name != '' }} runs-on: ubuntu-latest permissions: contents: read @@ -28,6 +33,16 @@ jobs: echo "name=${IMAGE_NAME_LOWER}" >> "$GITHUB_OUTPUT" echo "uri=${{ env.REGISTRY }}/${IMAGE_NAME_LOWER}" >> "$GITHUB_OUTPUT" + - name: Resolve image version tag + id: version + run: | + IMAGE_TAG="${{ inputs.version || github.event.release.tag_name }}" + if [ -z "${IMAGE_TAG}" ]; then + echo "Image tag is required but was not provided." + exit 1 + fi + echo "tag=${IMAGE_TAG}" >> "$GITHUB_OUTPUT" + - name: Log in to the Container registry uses: docker/login-action@v4 with: @@ -42,7 +57,7 @@ jobs: images: ${{ steps.image.outputs.uri }} tags: | type=raw,value=latest - type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }} + type=raw,value=${{ steps.version.outputs.tag }} - name: Build and push Docker image uses: docker/build-push-action@v7 @@ -51,5 +66,5 @@ jobs: push: true tags: | ${{ steps.image.outputs.uri }}:latest - ${{ steps.image.outputs.uri }}:${{ github.event.release.tag_name }} + ${{ steps.image.outputs.uri }}:${{ steps.version.outputs.tag }} labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 067aaf0e..52af04c9 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -186,3 +186,13 @@ jobs: artifacts: "release-assets/*" allowUpdates: true replacesArtifacts: true + + publish-docker: + needs: create-release + permissions: + contents: read + packages: write + uses: ./.github/workflows/build-docker.yml + with: + version: ${{ github.event.inputs.version }} + secrets: inherit