Skip to content

feat: add template-sync reusable workflow#261

Merged
botantler[bot] merged 2 commits into
mainfrom
claude/ci-template-sync-workflow
May 29, 2026
Merged

feat: add template-sync reusable workflow#261
botantler[bot] merged 2 commits into
mainfrom
claude/ci-template-sync-workflow

Conversation

@devantler
Copy link
Copy Markdown
Contributor

What

Adds a template-sync.yaml reusable workflow that keeps a repository in sync with an upstream template repository, using AndreasAugustin/actions-template-sync (SHA-pinned to v2.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

  • App token by default (use-app-token: true) — mirrors the update-agent-skills.yaml pattern. A sync PR opened with the default GITHUB_TOKEN does not trigger the caller's on: pull_request CI, leaving it blocked; an App token (from vars.APP_ID + secrets.APP_PRIVATE_KEY) avoids that.
  • Conventional-Commit defaultspr-title/pr-commit-msg default to chore: … 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-sync is SHA-pinned per zizmor.yml (*: hash-pin). No harden-runner — consistent with 12/13 existing reusable workflows incl. the update-agent-skills.yaml analogue.

Validation

  • yamllint clean.
  • actionlint clean (the only two warnings are pre-existing code-quality scope notes on unrelated jobs).
  • zizmor --config zizmor.yml clean ("No findings to report").
  • [Test] Template Sync - Dry Run job added to ci.yaml (uses the dry-run job-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:

  • a new devantler-tech/gitops-tenant-template repo (the source of plumbing),
  • scheduled callers + .templatesyncignore in ascoachingogvaner and wedding-app,
  • a platform tenant-onboarding doc.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 29, 2026 22:51
@devantler devantler marked this pull request as ready for review May 29, 2026 22:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml using AndreasAugustin/actions-template-sync.
  • Documents usage, inputs, secrets, defaults, and .templatesyncignore behavior.
  • 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.

Comment thread .github/workflows/template-sync.yaml
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>
@botantler botantler Bot enabled auto-merge (squash) May 29, 2026 23:51
@botantler botantler Bot merged commit a84d9c0 into main May 29, 2026
37 checks passed
@botantler botantler Bot deleted the claude/ci-template-sync-workflow branch May 29, 2026 23:55
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board May 29, 2026
@botantler
Copy link
Copy Markdown
Contributor

botantler Bot commented May 29, 2026

🎉 This PR is included in version 5.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@botantler botantler Bot added the released an issue that has been solved in a release label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released an issue that has been solved in a release

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants