ci(forgejo): add weekly upstream-sync workflow (#8) #38

Open
jmz wants to merge 1 commit from feat/upstream-sync-action into main
Owner

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/wanderer main, and if the fork's base branch is behind, pushes a dated upstream-sync/<date> branch (pointing at upstream) and opens a PR into main. 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:

  • Actions enabled on the repo with a runner on the ubuntu-latest label (same as the existing .github workflows).
  • The automatic Actions token must be allowed to push branches + create PRs (repo-scoped default). If PR creation is forbidden, set a PAT secret and swap ${{ github.token }} in the Open sync PR step.

Validation: YAML parses; all embedded run: scripts pass bash -n; the core git logic (fetch upstream, rev-list --count, branch-from-upstream/main, and the ls-remote idempotency 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.

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/wanderer` `main`, and if the fork's base branch is behind, pushes a dated `upstream-sync/<date>` branch (pointing at upstream) and opens a PR into `main`. 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:** - Actions enabled on the repo with a runner on the `ubuntu-latest` label (same as the existing `.github` workflows). - The automatic Actions token must be allowed to push branches + create PRs (repo-scoped default). If PR creation is forbidden, set a PAT secret and swap `${{ github.token }}` in the *Open sync PR* step. **Validation:** YAML parses; all embedded `run:` scripts pass `bash -n`; the core git logic (fetch upstream, `rev-list --count`, branch-from-`upstream/main`, and the `ls-remote` idempotency 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**.
Adds .forgejo/workflows/upstream-sync.yml: a weekly (and manually dispatchable)
job that checks whether upstream's default branch has commits the fork's base
branch is missing and, if so, pushes a dated branch and opens a sync PR into
main. Merging is left to a human via the PR so Forgejo surfaces any conflicts.

Kept in .forgejo/ (not .github/) so it does not diverge the workflows shared
with upstream and does not run on the upstream GitHub repo.

Closes #8.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/upstream-sync-action:feat/upstream-sync-action
git switch feat/upstream-sync-action

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/upstream-sync-action
git switch feat/upstream-sync-action
git rebase main
git switch main
git merge --ff-only feat/upstream-sync-action
git switch feat/upstream-sync-action
git rebase main
git switch main
git merge --no-ff feat/upstream-sync-action
git switch main
git merge --squash feat/upstream-sync-action
git switch main
git merge --ff-only feat/upstream-sync-action
git switch main
git merge feat/upstream-sync-action
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
public/wanderer!38
No description provided.