feat(workflows): reusable sync-main-to-edge workflow - #24
Merged
Merged
Conversation
Reusable workflow that reads `.gitupstream` (YAML) from the caller repo
and syncs the configured upstream branch (typically `main`) into one or
more target `*/edge` branches using
aormsby/Fork-Sync-With-Upstream-action@v3.4.3 (pinned by SHA).
Schema:
version: 1
sync:
- upstream: main
targets:
- alex/edge
Targets that do not yet exist on the remote are skipped gracefully so
the workflow stays green for repos that have not bootstrapped an edge
branch yet.
Refs nsheaps/.ai-agent-alex#685.
Co-Authored-By: Agent Alex Picard <alex-nsheaps[bot]@users.noreply.github.com>
This was referenced May 28, 2026
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.
Summary
Adds a reusable workflow at
.github/workflows/sync-main-to-edge.yamlthat consumer repos can call to keep one or more*/edgebranches in sync with their default branch (typicallymain)..gitupstreamYAML config from the caller repo (schema below)sync[*].targets83d78e8c4bf524e79b091cf257deba4dee9e60df) once per target.gitupstreamschema (YAML, repo root)Action chosen — why aormsby/Fork-Sync-With-Upstream-action
Full research: alex repo
.claude/tmp/edge-sync-action-research.md.aormsby's README explicitly states "It should work to keep any two branches in sync" — same-repo branch-to-branch is a first-class use case. We point
upstream_sync_repoat${{ github.repository }}so the action operates inside one repo.Action pinning
All
uses:are SHA-pinned per Henry's P2 rule:actions/checkout→de0fac2e4500dabe0009e67214ff5f5447ce83dd(v6)aormsby/Fork-Sync-With-Upstream-action→83d78e8c4bf524e79b091cf257deba4dee9e60df(v3.4.3)yqis installed bycurlfrom the v4.53.2 release for matrix-building.Test plan
alex/edgebranchOpen Questions
prunemode that deletes edge branches no longer listed in.gitupstream? Not in scope here — flag for follow-up if you want it.GITHUB_TOKENfor push. On repos wheremain → edgepush is blocked by branch protection onedge, the sync will fail. Do we want protection on edge branches? Current assumption: edge is unprotected so the auto-sync just works.workflow_callonly (current design), or alsoworkflow_dispatchfor manual one-off runs? Easy to add — say the word.Refs nsheaps/.ai-agent-alex#685.
🤖 Generated with Claude Code
Decisions (Q1/Q2/Q3 follow-up 2026-05-28)
Nate answered the original Open Questions (Discord msg):
uses: ...@mainfor the reusable..gitupstream): Seed each agent repo with<agent>/edgetarget + create the branch. Done in this PR set;alex/edge,jack/edge,henry/edgenow exist on their respective repos.push: branches:[main],schedule: '0 6 * * *'(nightly UTC),workflow_dispatch:.Full follow-up: https://github.com/nsheaps/.ai-agent-alex/blob/main/docs/journal/2026/05/28/edge-sync-q2q3-followup.md