ci(forgejo): add weekly upstream-sync workflow (#8) #38
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
public/wanderer!38
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/upstream-sync-action"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
.forgejo/workflows/upstream-sync.yml— a weekly (Mondays 04:17 UTC) + manually-dispatchable job that keeps the fork in sync with upstream.What it does: fetches
open-wanderer/wanderermain, and if the fork's base branch is behind, pushes a datedupstream-sync/<date>branch (pointing at upstream) and opens a PR intomain. Merging is left to a human via the PR, so Forgejo surfaces any conflicts in the PR view (divergence stays small under upstream-first, so conflicts should be rare).Why
.forgejo/not.github/: the.github/workflows are shared with upstream; a pull-from-upstream job is fork-specific, so keeping it in.forgejo/avoids diverging the shared files and it won't run on the upstream GitHub repo.Requirements / notes:
ubuntu-latestlabel (same as the existing.githubworkflows).${{ github.token }}in the Open sync PR step.Validation: YAML parses; all embedded
run:scripts passbash -n; the core git logic (fetch upstream,rev-list --count, branch-from-upstream/main, and thels-remoteidempotency guard) was dry-run locally against this repo (base is currently 1 commit behind upstream). Actions runtime itself not executed here.Closes #8. Prepared during holiday-autopilot — not merged.
48383b6af4to5d4c9bcc2fPhase-1 catch-up review (upstream v0.21.2)
Rebased onto
main-v0.21.2, with the base retargeted. The old head is kept asarchive/feat-upstream-sync-action-pre-v0.21.2. I added5d4c9bccto make it runnable on our runner and safe for our branches:runs-on: docker,actions/checkout@v4, and apt-installed git/jq/curl. The node-with-docker job image has no git or jq and runs as root, sosudowould fail. This is the same setup asci.yml(forgejo-runner v12 on the NAS). The originalubuntu-latest+checkout@v7+sudo apt-getwould have broken on the missing git/jq and onsudo.refs/heads/upstream-sync/<date>(the name is checked), with no--force.mainanddeployare never written; merging stays a human PR decision.mainplus a merge of upstream. The branch keeps.forgejo/, so our CI runs on it and not upstream's.githubrelease workflows, and the PR is a fast-forward formain.workflow_dispatchinputdry_run.SYNC_TOKENsecret.deployon a new branch and to back up pb_data first when there are migrations.Open questions / before merging:
dry_run=truedispatch (run 12824) was queued and then cancelled with the rest of tonight's CI. Run it in a quiet window.mainanddeploy(no force push, push restricted to jmz). maximus can't read or set protections. This is the real guarantee; the workflow only adds a second layer.SYNC_TOKEN(a PAT of a write collaborator) and check the first run.17 4 * * 1) sits next to Renovate (04:30 daily) and the night backups.Verdict: merge after (1) a green dry run and (2) the branch protections are set. Closes #8.
🤖 Generated with Claude Code
https://claude.ai/code/session_01M1AaXnEghenJ4BDxNryKvs