Skip to content

Commit 58c447b

Browse files
dkirov-ddclaude
andauthored
ci(release): gate release-trigger on the release environment (#23662)
* ci(release): gate release-trigger on the release environment The prepare job in release-dispatch.yml creates tags before reaching the environment: release gate on the dispatch job. Adding environment: release to the calling dispatch job in release-trigger.yml ensures GitHub's deployment protection runs before the reusable workflow's jobs start, so tagging requires manual approval. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * ci(release): gate release-trigger on the release environment Add environment: release to the dispatch job that calls the reusable release-dispatch.yml workflow. GitHub's deployment protection now runs before any of the reusable workflow's jobs start, so the prepare step (which creates tags) requires manual approval. The inner environment: release on release-dispatch.yml's dispatch job is removed in integrations-core — a single gate at the trigger level is sufficient. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * ci(release): gate release-trigger via intermediate approve job environment: release cannot be used on a job that calls a reusable workflow (uses:). Instead, add an explicit approve job that holds the environment gate; the dispatch job depends on it, so the reusable workflow's prepare step (which creates tags) cannot run until a reviewer approves the deployment. Remove the previously-added environment: release from the dispatch job (invalid) and the inner environment: release from release-dispatch.yml (redundant — a single gate is sufficient). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent dbc5c09 commit 58c447b

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/release-dispatch.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ jobs:
9696
needs: prepare
9797
if: needs.prepare.outputs.has_packages == 'true' && !inputs.dry-run
9898
runs-on: ubuntu-latest
99-
environment: release
10099

101100
strategy:
102101
matrix:

.github/workflows/release-trigger.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,17 @@ jobs:
5454
echo "is-stable-release=false" >> "$GITHUB_OUTPUT"
5555
fi
5656
57+
approve:
58+
name: Await release approval
59+
needs: context
60+
runs-on: ubuntu-latest
61+
environment: release
62+
steps:
63+
- run: echo "Release approved"
64+
5765
dispatch:
5866
name: Release
59-
needs: context
67+
needs: [context, approve]
6068
uses: ./.github/workflows/release-dispatch.yml
6169
with:
6270
source-repo: integrations-core

0 commit comments

Comments
 (0)