Repository navigation
ci: follow upstream automatically and gate what gets synced - #2
Merged
Merged
Conversation
Add mirror-sync.yml, a daily workflow that: - reviews new upstream commits with review-upstream-diff.sh and refuses to sync a diff that touches .github/ (it would run with this repository's privileges once merged) - fast-forwards the master mirror - waits out a 3-day cooldown, skippable by manual dispatch for urgent security fixes - opens a sync pull request into nemtus, titled [routine] or [needs review], with the review report in its body - reports when upstream's latest release is not contained in the latest nemtus-v* release - notifies Discord through the DISCORD_WEBHOOK_URL repository secret Releasing stays manual. nemtus-image.yml now refuses to publish a commit that is not on the nemtus branch. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Adds a daily
mirror-sync.ymlso upstream changes and pending releases are noticed without watching upstream by hand, with guards against syncing a malicious upstream change.What it does
Sync (daily, or manual dispatch)
.github/scripts/review-upstream-diff.sh:routine(version lines only),needs review(anything else, with a list of what to look at), orblocked(touches.github/; the run fails and nothing is pushed).mastermirror.skip_cooldownopens the pull request immediately.sync/upstream-<sha>pull request intonemtuswith the review report, and starts thebuildcheck on it.Release watch: reports when upstream's latest release is not contained in the latest
nemtus-v*release, with the tag to push. It never tags or publishes.Notify: Discord through the repository secret
DISCORD_WEBHOOK_URL(skipped when unset).Publish guard:
nemtus-image.ymlnow refuses to publish a commit that is not onnemtus.The sync job has a write token and never executes upstream code: it runs git and the review script from the
nemtuscheckout only.Test
Run locally against a sandbox (bare origin/upstream clones, stubbed
gh):builddispatch); rerun with the pull request open;skip_cooldown; blocked on.github/(mirror not advanced); merge conflict; rewritten upstream historynemtus-v1.25.7-2pending), stale release, up to date, new upstream release not yet synced, malformed tag0e72267..8f8f9ffroutine,8f8f9ff..38c350dneeds review) and synthetic diffs (swapped download host, pipe to shell, changed base image registry, payload in a startup script, binary, opaque blob, added workflow)Not exercised on GitHub yet:
scheduleandworkflow_dispatchonly run from the default branch, so the first real run happens after this is merged.After merging
DISCORD_WEBHOOK_URL.🤖 Generated with Claude Code