feat(ci): auto-trigger make-release and docs rebuild on PR merge#5487
Open
svozza wants to merge 3 commits into
Open
feat(ci): auto-trigger make-release and docs rebuild on PR merge#5487svozza wants to merge 3 commits into
svozza wants to merge 3 commits into
Conversation
dreamorosi
reviewed
Jul 23, 2026
dreamorosi
reviewed
Jul 23, 2026
dreamorosi
requested changes
Jul 23, 2026
dreamorosi
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the PR - left a couple notes in the workflow file.
Adds on_release_pr_merge.yml to remove the last two manual triggers in the release pipeline: dispatching make-release.yml after a ci-bump-* version PR merges, and rebuild_latest_docs.yml after a ci-layer-docs-* ARN-doc PR merges.
Updates the release checklist to describe Make Release and Rebuild latest docs as automatically triggered by PR merge, since manual dispatch is no longer needed.
Addresses review feedback: separates the ci-bump and ci-layer-docs triggers into their own workflow files, and rewrites the header comment to describe the workflow's purpose going forward rather than the manual process it replaces.
svozza
force-pushed
the
chore/auto-trigger-release-pipeline
branch
from
July 23, 2026 11:04
fb996a7 to
5ec72cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #5451 (merged as #5462). Removes the last two manual triggers in the release pipeline by adding a new workflow that auto-dispatches the next step when the version-bump PR or the layer ARN-doc PR merges to
main.Changes
.github/workflows/on_release_pr_merge.yml:trigger-make-release: dispatchesmake-release.ymlwhen a merged PR's branch matchesci-bump-*(opened bymake-version.yml)trigger-rebuild-docs: dispatchesrebuild_latest_docs.ymlwith the version resolved frompackages/commons/package.jsonwhen a merged PR's branch matchesci-layer-docs-*(opened bypublish_layer.yml'supdate_layer_arn_docsjob)docs/maintainers.md's release checklist to describeMake ReleaseandRebuild latest docsas automatically triggered by PR merge, since manual dispatch is no longer neededSecurity considerations
This workflow can dispatch
make-release.yml(real npm publish) andrebuild_latest_docs.yml(real writes to production docs), so the trigger conditions are deliberately strict and layered:pull_request, notpull_request_target: runs with the default read-onlyGITHUB_TOKENand no secrets in context for the triggering event itself. A PR from a fork could never reach thegh workflow runstep even if every other condition below happened to match.head.repo.full_name == github.repository: explicitly rejects PRs opened from forks, independent of the author check below.pull_request.user.login == 'github-actions[bot]': this is the actual GitHub-assigned identity of whoever called the API to open the PR — not spoofable via branch name, PR title, or body. Verified against real PR history that bothci-bump-*andci-layer-docs-*PRs are opened byaws-powertools/actions'create-praction using the defaultGITHUB_TOKEN, so.user.loginis alwaysgithub-actions[bot]. This is deliberately notaws-powertools-bot— that name only shows up as the git commit author, set locally bycreate-prviagit config, and is unrelated to what GitHub exposes as the PR's author.ci-bump-/ci-layer-docs-): scopes each job to the one specific automation flow it should react to, so an unrelated PR merge (e.g. a dependabot bump) can't accidentally trigger a release step even if it somehow satisfied the other conditions.permissions: {}at the workflow level, with each job granted only what it needs (actions: writeto dispatch;contents: readadded only for the job that checks outmainto read the published version).Design and end-to-end behavior — including the negative case, where an unrelated PR merge correctly leaves both jobs
skipped— were verified on a private staging fork prior to this PR, since dispatching for real against this repo would trigger real npm publishes and AWS/S3 writes.Issue number: closes #5455
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.