Skip to content

ci: repin x402 pins via a release-time PR, not a push to main#662

Open
bussyjd wants to merge 1 commit into
mainfrom
chore/repin-via-release-prep
Open

ci: repin x402 pins via a release-time PR, not a push to main#662
bussyjd wants to merge 1 commit into
mainfrom
chore/repin-via-release-prep

Conversation

@bussyjd

@bussyjd bussyjd commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What

Replace the push-time repin-embedded-pins job (removed from
docker-publish-x402.yml) with a release-time release-prep.yml that opens
an auto-merging, GitHub-verified repin PR.

Why

The old job committed the pin bump directly to protected main and was
rejected on every run:

BRANCH_PROTECTION_RULE_VIOLATION: Changes must be made through a pull request.
Required status check "lint-test" is expected.

So the embedded x402 pins drifted from main, and releasing off latest main
required a manual repin (just hit while cutting v0.11.0 — see #661).

How

release-prep.yml (workflow_dispatch, ref = release commit):

  1. builds the four x402 images for the release commit, then
  2. opens an auto-merging PR repinning the embedded manifests, committed via
    createCommitOnBranch (GitHub-verified) onto a feature branch → normal
    PR review. No ruleset bypass; no privileged push to main.

Repinning is a release-time concern (so is release.yml's verify-image-pins
gate), so it now runs at release time instead of fighting branch protection on
every push.

CI on the generated PR: GitHub doesn't trigger CI for GITHUB_TOKEN-authored
PRs. Optional minimal, no-bypass GitHub App (REPIN_APP_ID /
REPIN_APP_PRIVATE_KEY; contents:write + pull-requests:write, never added
to a ruleset bypass list
) makes the PR's checks run so it auto-merges after one
approval; without it a maintainer closes & reopens the PR to fire CI. Details in
docs/release-x402-pins.md.

Security posture

No bypass of main, commits stay verified, the pin bump still lands through
review. Strictly safer than adding the github-actions bot (or the app) to the
ruleset bypass list, which would let any contents:write workflow push to main.

The push-time repin-embedded-pins job in docker-publish-x402.yml committed the
pin bump directly to protected main and was rejected on every run
(BRANCH_PROTECTION_RULE_VIOLATION: changes must go through a PR + lint-test), so
embedded pins drifted and releasing off latest main needed a manual repin.

Replace it with release-prep.yml (workflow_dispatch): build the four x402 images
for the release commit, then open an auto-merging, GitHub-verified repin PR
(createCommitOnBranch onto a feature branch -> PR review, no ruleset bypass). An
optional minimal no-bypass GitHub App (REPIN_APP_ID / REPIN_APP_PRIVATE_KEY)
makes the PR's CI run so it auto-merges; without it a maintainer reopens the PR
to fire CI. See docs/release-x402-pins.md.
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.

1 participant