refactor: replace push-based sync with pull-based reusable workflow#4
Merged
refactor: replace push-based sync with pull-based reusable workflow#4
Conversation
Remove sync-downstream.yml and its PAT requirement. Sync is now pull-based: each downstream repo calls self-update.yml as a reusable workflow via uses: nwarila/python-template/.github/workflows/self-update.yml@v1. - Extract inline sync logic into scripts/sync.py (standalone, testable) - Add workflow_call trigger to self-update.yml for downstream callers - Remove downstream_repos from sync-manifest.json (template doesn't push) - Add sync.py to manifest so downstream repos receive it - Document manifest-driven sync rationale vs submodules/packages - Update PLAN.md and README.md to reflect pull-based architecture
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
sync-downstream.ymland its PAT requirement — sync is now pull-basedself-update.ymlas a reusable workflow viauses: nwarila/python-template/.github/workflows/self-update.yml@v1scripts/sync.py(standalone, stdlib-only, testable)workflow_calltrigger so the same workflow serves both dogfood and downstreamdownstream_reposfromsync-manifest.json(template doesn't push)Design
Each repo owns its own updates. The template publishes releases, consumers pull when ready. No cross-repo credentials, no push permissions, no coupling.
Downstream repos only need a thin wrapper:
Test plan
scripts/sync.pyruns against this repo as template source (15 files synced)downstream_repos, all mappings have src/dest)schedule,workflow_dispatch,workflow_call