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