Skip to content

refactor: replace push-based sync with pull-based reusable workflow#4

Merged
NWarila merged 1 commit intomainfrom
refactor/pull-based-sync
Apr 8, 2026
Merged

refactor: replace push-based sync with pull-based reusable workflow#4
NWarila merged 1 commit intomainfrom
refactor/pull-based-sync

Conversation

@NWarila
Copy link
Copy Markdown
Owner

@NWarila NWarila commented Apr 8, 2026

Summary

  • Remove sync-downstream.yml and its PAT requirement — sync is now pull-based
  • Downstream repos call 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, stdlib-only, testable)
  • Add workflow_call trigger so the same workflow serves both dogfood and downstream
  • Remove downstream_repos from sync-manifest.json (template doesn't push)
  • Document manifest-driven sync rationale vs submodules/packages

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:

name: Template Sync
on:
  schedule:
    - cron: "0 6 * * 1"
  workflow_dispatch:
permissions:
  contents: write
  pull-requests: write
jobs:
  sync:
    uses: nwarila/python-template/.github/workflows/self-update.yml@v1

Test plan

  • scripts/sync.py runs against this repo as template source (15 files synced)
  • Marker-preserve logic tested with template and repo-specific regions
  • YAML syntax validated on self-update.yml
  • Manifest structure validated (no downstream_repos, all mappings have src/dest)
  • All three workflow triggers present: schedule, workflow_dispatch, workflow_call

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
@NWarila NWarila merged commit b001ad1 into main Apr 8, 2026
13 checks passed
@NWarila NWarila deleted the refactor/pull-based-sync branch April 8, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant