From c30294f31111108935b6bb78138806ad99db6bf7 Mon Sep 17 00:00:00 2001 From: Brad Ison Date: Tue, 11 Aug 2026 18:18:10 +0200 Subject: [PATCH] [misc] Build release branches in the Release workflow Pushes to release-* branches now run the Release workflow and publish immutable sha-* container images, the way pushes to main already do. Without this, a release branch had no post-merge CI and no artifact to run the pre-release test suites against before tagging. The floating "main" image tag is only pushed for main builds; release branches get the sha-* tag alone. --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 727bff45a..93f9e029f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,7 @@ on: - "v*" branches: - main + - "release-*" pull_request: env: @@ -254,15 +255,19 @@ jobs: id: tag_and_push_images if: | (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || - (github.event_name == 'push' && github.ref == 'refs/heads/main') + (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-'))) run: | set -euo pipefail resolve_tags() { if [[ "${{ github.event_name }}" == "pull_request" ]]; then echo "pr-${{ github.event.pull_request.number }}" - else + elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then echo "main sha-$(git rev-parse --short HEAD)" + else + # Release branches get an immutable sha-* tag only — the floating + # "main" tag must never move from a release branch. + echo "sha-$(git rev-parse --short HEAD)" fi }