From 053e22e7fe7020b061acf3e6cf21d0c57f5e66b7 Mon Sep 17 00:00:00 2001 From: Christin Date: Fri, 20 Nov 2026 08:28:06 +0100 Subject: [PATCH] ci: build the Docker images for the release tag bump-version.yml pushes the release tag with GITHUB_TOKEN. Events from GITHUB_TOKEN do not start other workflows, so docker-build.yml never ran for v0.3.0, and Docker Hub has no 0.3.0 or 0.3 image. bump-version now starts docker-build.yml for the new tag with a workflow_dispatch event, which GITHUB_TOKEN may trigger. docker/metadata-action takes the version tags from the tag ref, also for workflow_dispatch. Additional changes Describe the tag and the Docker images in the release process docs Co-Authored-By: Claude Opus 5.5 Assisted-by: Claude Code (claude-opus-5-5) --- .github/workflows/bump-version.yml | 14 +++++++++++++- .github/workflows/docker-build.yml | 3 +++ docs/develop/release.md | 4 ++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index e24645fa..98a91d69 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -9,6 +9,7 @@ on: permissions: contents: write # Required for pushing commits and tags pull-requests: write # Required to create a pull request + actions: write # Required to start the Docker image build for the release tag concurrency: group: bump-version-main @@ -63,7 +64,18 @@ jobs: echo "tagged=true" >> "$GITHUB_OUTPUT" fi - # --- Step 6: Create PR to bump to dev version --- + # --- Step 6: Build the Docker images of the release --- + # The tag pushed with GITHUB_TOKEN does not trigger docker-build.yml; a workflow_dispatch + # event does. Runs before the dev version PR, so a failing PR step does not skip it. + - name: Start Docker image build for the release tag + if: steps.tagging.outputs.tagged == 'true' + run: | + gh workflow run docker-build.yml --ref "$TAG" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: v${{ steps.calc.outputs.version }} + + # --- Step 7: Create PR to bump to dev version --- - name: Bump dev version and create PR if: "!contains(steps.calc.outputs.version, 'dev')" run: | diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 5bad10da..18b414d7 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -12,6 +12,9 @@ on: pull_request: branches: - '**' + # bump-version.yml starts the build for the release tag it creates. A tag pushed with + # GITHUB_TOKEN does not trigger the push event above. + workflow_dispatch: env: DOCKERHUB_REPO: akkudoktor/eos diff --git a/docs/develop/release.md b/docs/develop/release.md index d462f400..06bc6c2f 100644 --- a/docs/develop/release.md +++ b/docs/develop/release.md @@ -135,6 +135,10 @@ See `CHANGELOG.md` for full details. The new release will automatically be published by the GitHub CI action. See `.github/workflows/bump-version.yml` for details. +The workflow tags the release commit `vX.Y.Z` and starts `.github/workflows/docker-build.yml` for +the tag. That run pushes the Docker images with the tags `X.Y.Z` and `X.Y` to Docker Hub +(`akkudoktor/eos`) and GHCR (`ghcr.io/akkudoktor-eos/eos`). Check that both tags exist after the run. + ### 5️⃣ CI: Open Pull Request for Development Version Marker After tagging the release, the CI automatically opens a Pull Request to bump