feat: add template-sync reusable workflow#261
Merged
Conversation
Add a `template-sync.yaml` reusable workflow that keeps a repository in sync with an upstream template repository via AndreasAugustin/actions-template-sync (SHA-pinned, v2.5.3), opening a PR with incoming template changes. It mints a GitHub App token by default (use-app-token: true) so the sync PR triggers the caller's CI, defaults the PR title/commit to a Conventional-Commit `chore:` so consumers' squash-merge changelogs stay clean, and reads consumer-owned paths from `.templatesyncignore`. Wire a `[Test] Template Sync - Dry Run` job into ci.yaml and document the workflow in README.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a reusable workflow for synchronizing repositories from an upstream template, plus documentation and CI coverage for its dry-run interface.
Changes:
- Introduces
.github/workflows/template-sync.yamlusingAndreasAugustin/actions-template-sync. - Documents usage, inputs, secrets, defaults, and
.templatesyncignorebehavior. - Adds the new workflow to CI’s reusable-workflow dry-run checks.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
README.md |
Documents the new Template Sync reusable workflow and its inputs/secrets. |
.github/workflows/template-sync.yaml |
Adds the reusable template sync workflow. |
.github/workflows/ci.yaml |
Adds a dry-run CI job for the new reusable workflow and includes it in required checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
A token from create-github-app-token without owner/repositories is scoped to the caller repo only, so it cannot clone a PRIVATE source-repo-path in a separate template repo (the sync would fail before opening a PR). Scope the token to the caller repo AND the template repo (same owner) so private templates work; public templates are unaffected. Addresses the Copilot review note on the template-sync workflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
🎉 This PR is included in version 5.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
What
Adds a
template-sync.yamlreusable workflow that keeps a repository in sync with an upstream template repository, usingAndreasAugustin/actions-template-sync(SHA-pinned tov2.5.3). It opens a PR with any incoming template changes.This is the keystone of a small cross-repo effort to give the platform's GitOps tenants a single source of truth for their shared CI/CD plumbing and stop them drifting.
Design notes
use-app-token: true) — mirrors theupdate-agent-skills.yamlpattern. A sync PR opened with the defaultGITHUB_TOKENdoes not trigger the caller'son: pull_requestCI, leaving it blocked; an App token (fromvars.APP_ID+secrets.APP_PRIVATE_KEY) avoids that.pr-title/pr-commit-msgdefault tochore: …because every consumer squash-merges on the PR title into its changelog (the third-party action's own default title is not Conventional Commits)..templatesyncignore— consumers list the files they own so sync only touches genuinely shared files.actions-template-syncis SHA-pinned perzizmor.yml(*: hash-pin). Noharden-runner— consistent with 12/13 existing reusable workflows incl. theupdate-agent-skills.yamlanalogue.Validation
yamllintclean.actionlintclean (the only two warnings are pre-existingcode-qualityscope notes on unrelated jobs).zizmor --config zizmor.ymlclean ("No findings to report").[Test] Template Sync - Dry Runjob added toci.yaml(uses thedry-runjob-skip pattern; validates the interface without opening a PR).Follow-ups (separate PRs)
Once this merges and is released, consumers pin to the new tag:
devantler-tech/gitops-tenant-templaterepo (the source of plumbing),.templatesyncignoreinascoachingogvanerandwedding-app,🤖 Generated with Claude Code