-
Notifications
You must be signed in to change notification settings - Fork 0
feat: adopt weekly template-sync with the tenant-template ownership model #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+141
β2
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: π Template Sync | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 6 * * 1" # weekly, Monday 06:00 UTC | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| template-sync: | ||
| # Skipped in the template repo itself (it is the sync source); runs in every | ||
| # instance created from this template, where it opens a PR with template | ||
| # changes. Outside devantler-tech the org-provided App credentials are | ||
| # absent and the scheduled run would only fail β so personal-account | ||
| # instances are off by default and opt in by supplying their OWN GitHub App | ||
| # (one that can open PRs): the APP_PRIVATE_KEY secret plus the APP_CLIENT_ID | ||
| # repository variable (the reusable workflow mints its token from that | ||
| # variable/secret pair), and setting the repository variable | ||
| # TEMPLATE_SYNC_ENABLED=true. | ||
| if: >- | ||
| github.repository != 'devantler-tech/dotnet-template' && | ||
| (github.repository_owner == 'devantler-tech' || vars.TEMPLATE_SYNC_ENABLED == 'true') | ||
| # The reusable workflow's job opens the sync PR, so the caller must grant it | ||
| # write to contents + pull-requests. A reusable workflow cannot be granted | ||
| # more than the caller, and the top-level `permissions: {}` grants none, so | ||
| # without this the run fails at startup (reusable-workflow permission check) | ||
| # β both here and in every instance where the job actually runs. | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| uses: devantler-tech/actions/.github/workflows/template-sync.yaml@0f27c13a9785608e0bbf9998777d27761b4de617 # v10.0.2 | ||
| with: | ||
| source-repo-path: devantler-tech/dotnet-template | ||
| secrets: | ||
| APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # .templatesyncignore β files an INSTANCE created from this template OWNS. | ||
| # | ||
| # Same syntax as .gitignore. The weekly template-sync workflow | ||
| # (devantler-tech/actions .github/workflows/template-sync.yaml, using | ||
| # AndreasAugustin/actions-template-sync) is skipped in this template repo itself | ||
| # and runs in every instance created from it β opening a PR that brings template | ||
| # changes downstream. It only ever touches files that exist in this template, and | ||
| # it SKIPS anything matched here, so an instance's tailored files are never | ||
| # clobbered by an upstream sync. | ||
| # | ||
| # Everything NOT listed here is TEMPLATE-OWNED shared plumbing kept current in | ||
| # every instance by template-sync β change it upstream in | ||
| # devantler-tech/dotnet-template, never by editing it in an instance. | ||
| # Template-owned plumbing includes the | ||
| # .github/workflows/{ci,publish,release,template-sync,todos,copilot-setup-steps} | ||
| # workflows, the shared configs (.editorconfig, .gitattributes, | ||
| # .pre-commit-config.yaml), and the CLAUDE.md/GEMINI.md shims. (ci.yaml is | ||
| # deliberately template-owned for devantler-tech instances β they all share the | ||
| # same ruleset-injected build/test workflows and this required-checks | ||
| # aggregation, so CI fixes must propagate. An instance OUTSIDE devantler-tech | ||
| # does not inherit those org rulesets and must replace ci.yaml with real | ||
| # build/test jobs β after doing so, add `.github/workflows/ci.yaml` to this | ||
| # file, which the instance owns, so a later sync cannot revert it.) | ||
|
|
||
| # --- Identity & docs (instance-specific) --- | ||
| AGENTS.md | ||
| README.md | ||
| LICENSE | ||
| .github/CODEOWNERS | ||
| .claude/skills/maintain/SKILL.md | ||
|
|
||
| # --- Release / dependency config the instance tailors --- | ||
| .releaserc | ||
| .gitignore | ||
| .github/dependabot.yaml | ||
|
|
||
| # --- Toolchain floor (instance-owned so SDK and TFMs move in lockstep) --- | ||
| # AGENTS.md's toolchain-floor policy requires global.json's SDK floor and every | ||
| # <TargetFramework> to move together. The project trees below are ignored, so a | ||
| # synced global.json bump would move the SDK floor WITHOUT its matching TFMs β | ||
| # a lockstep violation delivered downstream. The instance owns the whole | ||
| # toolchain upgrade instead (the .NET parity to go-template, where the | ||
| # instance-owned go.mod carries the Go toolchain floor). | ||
| global.json | ||
|
|
||
| # --- The instance's own solution and code --- | ||
| # The solution, projects, and code are renamed from Example.* by | ||
| # scripts/rename-placeholders.sh at scaffold time and evolve with the instance; | ||
| # a sync must never clobber them β nor re-introduce the template's Example.slnx | ||
| # after the rename. src/ and tests/ are ignored WHOLESALE so a template file | ||
| # added later at a path the instance already uses can never touch instance code. | ||
| Example.slnx | ||
| src/ | ||
| tests/ | ||
|
devantler marked this conversation as resolved.
|
||
|
|
||
| # --- Scaffolding machinery (template-only; dead code in a live instance) --- | ||
| # These run when a NEW repo is created from this template ("use this template" | ||
| # copies everything, so scaffolding still arrives at creation time). A | ||
| # scaffolded instance never runs them again β ignoring them stops template-sync | ||
| # (re-)introducing them downstream, so an instance that deletes them stays clean. | ||
| scripts/rename-placeholders.sh | ||
| scripts/rename-placeholders.test.sh | ||
| .github/workflows/validate-scaffold.yaml | ||
|
|
||
| # --- This ignore-list itself (the instance curates its own ownership) --- | ||
| .templatesyncignore | ||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.