Repository navigation
Open staging promotion PRs automatically from dev's pins - #117
Merged
Merged
Conversation
promote-staging.yml runs scripts/ci/promote-staging.sh on every push to main. It keeps one pull request, "Promote dev's images to staging", that sets each staging pin to what dev pins and lists what each service brings over staging's current pin, read from the source commit of the dev bump that first carried each digest. Once staging matches dev it closes the pull request. It never enables auto-merge, and disables one enabled for an earlier head: merging is the promotion, and a new head is a new set of images. A branch a person pushed to, to hold a service back, is left alone while its pull request is open. set-node-pin.sh takes --node, defaulting to dev, so the promotion writes pins through the same script as the bumps. The runbook's deploy entry says how to promote and how to hold a service back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Peeja
requested review from
alanshaw and
bajtos
and
a balanced review from Copilot
September 29, 2026 21:07
Peeja
enabled auto-merge (squash)
September 30, 2026 21:18
Contributor
Author
|
I'm merging this and keeping an eye on the result. We should see a staging deploy PR appear and then be kept up to date. |
Member
|
Love it! The list of changes looks a bit weird when formatted on GitHub - the PR title is shown twice, the commit hash is not a link. See here: #129
|
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.

Written by Claude.
Closes FIL-1381
Problem
Dev gets a bump PR for every image a service publishes, and the bot merges it itself. Promoting to staging means editing
nodes/staging/eu-central-3/apps/versions.envby hand, and working out from each pin's source commit what the promotion brings. #86, #107 and #116 were all written that way.Change
.github/workflows/promote-staging.ymlrunsscripts/ci/promote-staging.shon every push tomain, and onworkflow_dispatch. It uses the fil-forge-bot token, as the bump workflows do, so the PR's checks run.scripts/ci/promote-staging.shkeeps one PR, "Promote dev's images to staging", onbot/promote-staging:mainplus staging's pins set to dev's, then opens or refreshes the PR. If the branch is already exactly that, it doesn't push, so the checks don't rerun.- Commit:line), and the compare API supplies the list in between.(#123)in titles is rewritten to(fil-forge/piri#123), so it doesn't link to this repository's PRs. If a source commit is unknown, or the API won't give a list, the body says so rather than failing.--dry-runbuilds the branch locally and prints the message, without pushing, opening or closing anything.scripts/ci/set-node-pin.shtakes--node, defaulting todev, so the promotion writes pins through the same script as the bumps. The node name must match^[a-z0-9-]+(/[a-z0-9-]+)?$, andnodes/<node>/apps/versions.envmust exist.docs/RUNBOOK.md: the deploy entry now says how to promote, how to hold a service back, and what--nodedoes.Nothing about dev's bumps changes.
refresh-bump-prs.shonly matchesbot/bump-*-image-dev, so it never touchesbot/promote-staging.Testing
set-node-pin.sh: it pins staging with--node staging/eu-central-3, and dev by default. It rejects--node ../x, a node with noversions.env, and a missing argument.--helpprints the whole header.promote-staging.sh: I ran it against a local bare repository standing in fororigin, withgh apistubbed by unauthenticatedcurlandgh prfaked and logged.mainat 02ab02a, just before Promote Piri and Ingot to staging #116, the dry run's change lists are the ones I wrote by hand for Promote Piri and Ingot to staging #116, oldest first.mainmoved, auto-merge onmain, auto-merge turned offmain(1867d62, after Promote Piri and Ingot to staging #116)Not run here:
shellcheckandactionlint, which aren't installed; CI'sshellcheck runs shellcheck. The workflow parses as YAML.make check-composepasses.Notes
bot/promote-staging, as it pushesbot/bump-*. If the ruleset limits the bot tobot/bump-*, the first run will fail at the push.🤖 Generated with Claude Code
https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
✴️