Repository navigation
ci: weekly upstream sync with auto-merge, build image on main - #16
Merged
Merged
Conversation
Add upstream-sync.yml (fork-only): every Monday it pushes Unpackerr/unpackerr main to sync/upstream, opens or updates a PR to main, waits for CI and merges it when green. Conflicts or red CI leave the PR open and fail the run. Requires the UPSTREAM_SYNC_TOKEN secret. fork.yml now also builds and pushes the GHCR image on pushes to main, tagged :main (plus :sha-...); :latest stays reserved for v* tags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kzh7gFueN8WPtT59UZzXKB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kzh7gFueN8WPtT59UZzXKB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kzh7gFueN8WPtT59UZzXKB
- Never force-push sync/upstream, so a conflict fix made on the open PR survives the next run; merge against the branch's real head SHA. - Only CONFLICTING is reported as a conflict, and the PR is commented once; an UNKNOWN mergeability just fails the run. - Check-registration loop no longer trips over pipefail. - Take the PR number from gh pr create's URL instead of re-listing. - Use gh pr merge --delete-branch instead of a manual remote delete. - fork.yml: per-ref concurrency so an older build cannot overwrite :main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kzh7gFueN8WPtT59UZzXKB
- Classify sync/upstream before pushing: keep it only when it carries unmerged non-upstream commits; replace a leftover branch already merged into main (with --force-with-lease); any push or remote error now fails the run instead of being mistaken for a conflict fix. - Wait for mergeability computed on this run's head SHA, not a cached value from the previous head. - Wait for the named REQUIRED_CHECKS to appear before watching CI, and report missing checks separately from failing ones. - Only rewrite the PR title/body (and sleep for check registration) when the branch actually moved. - fork.yml: concurrency per event and ref, so a manual run no longer cancels a push build; the branch tag is only published for main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kzh7gFueN8WPtT59UZzXKB
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.
Fork-only automation for keeping
bateman/unpackerrin sync withUnpackerr/unpackerrand publishing the container image.upstream-sync.yml(new)timezone:on the schedule, so it follows DST), and can also be started by hand withworkflow_dispatch. It is skipped onUnpackerr/unpackerr.mainhas new commits, it pushes them tosync/upstreamand opens a PR tomain, or updates the one already open.REQUIRED_CHECKS(gotest (ubuntu),golangci-lint (linux),integration) to appear and pass. It then merges with a merge commit (--match-head-commit) and deletessync/upstream.sync/upstreamis never overwritten while it carries an unmerged conflict fix. A leftover branch that was already merged intomainis replaced (--force-with-lease). Any push or remote error fails the run.UPSTREAM_SYNC_TOKENsecret: a fine-grained PAT for this repo with Contents, Pull requests and Workflows set to read/write. The defaultGITHUB_TOKENcan't push upstream's workflow-file changes, and its pushes don't trigger CI.fork.ymlmain, tagged:mainalongside:sha-….:latestis still published only fromv*tags.:mainand a manual run doesn't cancel a build started by a push.Validation
🤖 Generated with Claude Code
https://claude.ai/code/session_01Kzh7gFueN8WPtT59UZzXKB