Skip to content

ci: auto-merge release-please PRs - #454

Merged
sebastiancorrea81 merged 1 commit into
mainfrom
ci/auto-merge-release-pr
Jul 29, 2026
Merged

ci: auto-merge release-please PRs#454
sebastiancorrea81 merged 1 commit into
mainfrom
ci/auto-merge-release-pr

Conversation

@sebastiancorrea81

Copy link
Copy Markdown
Collaborator

Summary

  • Adds auto-merge-release-pr, which auto-merges the chore(main): release x.y.z PR opened by release-please once its checks pass, using a GitHub App token (feat: add reusable auto-merge-release-pr workflow actions-nullplatform#83/chore(main): release 1.12.6 #84/fix(scope): Fixing typo in annotation in scope definition module #85) instead of the default GITHUB_TOKEN — a merge with the default token wouldn't trigger the downstream push-triggered release workflow that creates the tag/GitHub Release.
  • Unlike the simpler setup already running in nullplatform/services-postgresql-rds and others, this repo's release.yml has a second job (generate-readmes) that pushes an extra commit (regenerated READMEs) to the release PR branch after the PR is opened. A pull_request-triggered auto-merge could race and merge before that commit lands. To avoid that, this workflow triggers on workflow_run completion of the whole Release Please workflow (both jobs), then looks up the open release PR itself and passes its number explicitly to the reusable workflow via the new pr_number input.

Depends on

Compatibility notes

  • main branch protection here requires only the trivy / Trivy IaC Scan status check, no reviews, no push restrictions — compatible with merging via the App token.
  • Heads up separately: the currently open release-please PR (chore(main): release 6.7.1 #453, release 6.7.1) has its checks stuck in action_required (never approved) — unrelated to this change, but worth unblocking regardless.

Test plan

Triggers off the completion of the whole 'Release Please' workflow run
(instead of pull_request events directly) so it always waits for the
generate-readmes job's README commit to land on the release PR branch
before merging. Delegates the actual merge to the reusable
auto-merge-release.yml workflow in actions-nullplatform, using a
GitHub App token so the downstream tag/GitHub Release still gets
created (a merge with the default GITHUB_TOKEN wouldn't trigger it).

Depends on nullplatform/actions-nullplatform#85 (pr_number input).
@sebastiancorrea81
sebastiancorrea81 merged commit 2754d93 into main Jul 29, 2026
44 checks passed
@sebastiancorrea81
sebastiancorrea81 deleted the ci/auto-merge-release-pr branch July 29, 2026 21:00
sebastiancorrea81 added a commit that referenced this pull request Jul 30, 2026
…flow_run (#455)

The workflow_run-triggered version merged in #454 fails immediately
with startup_failure (0 jobs ever scheduled) for reasons that aren't
visible via the API — likely an org-level Actions policy restricting
workflow_run, but that needs admin access to confirm.

Switch back to the pull_request trigger proven to work in the other
services-* repos, and instead solve the generate-readmes race with
concurrency: cancel-in-progress keyed on the PR number. When the
README-regeneration commit lands (observed ~38s after the release PR
is opened, on a real release), it fires a new 'synchronize' event;
GitHub cancels whatever older run for the same PR is still waiting on
checks, so only the run for the final commit can ever reach the merge
step.

Co-authored-by: sebas_correa <sebastian.correa@nullplatform.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants