CI Updater

Run copier update and open or update a template-sync PR.

Usage

jobs:
  ci-update:
    uses: athackst/ci/.github/workflows/ci_updater.yml@main
    secrets:
      token: $

Inputs

Name Description Default
create-pr (optional) Create or update a PR with template changes. true
pr-branch (optional) Branch name used for template updates. ci/update-ci-template
pr-title (optional) Pull request title. chore: update CI template
commit-message (optional) Commit message for template updates. chore: apply CI template update
checkout-ref (optional) Git ref to check out before applying template updates. ""

Secrets

Name Description Default
token (optional) Token used for checkout, push, PR operations, failure issue maintenance, and label setup. $

Outputs

Name Description
changed Whether template changes were produced by Copier.
changed-files Newline-delimited list of Copier-managed files changed by the update.
branch Branch name used for the update, whether a PR was created or changes were pushed directly.
pr-url URL for the updater PR, if one was created or updated.

Permissions

  • Requires contents: write, pull-requests: write, issues: write, and actions: write.
  • actions: write is needed in this environment when template updates modify .github/workflows/*.

Advanced

  • Skips the Copier update entirely when .copier-answers.ci.yml is missing.
  • Updater PRs are labeled automerge and skip-changelog automatically.
  • Only changes under .github/ and .copier-answers.ci.yml count toward the changed output, so other files do not open an update PR.
  • Logs the managed-file status, diffstat, and diff from the Detect changes step and includes the changed file list in successful update summaries.
  • Fails before PR creation or branch push when Copier leaves merge conflicts in managed files, lists the conflicted files in the workflow summary, and prints index entries plus the managed diff in the log.
  • Creates or updates one open failure issue with updater context and a local repro command if the workflow fails, then comments on and closes the issue after a later successful run.
  • Writes a final workflow summary for both the PR and direct-push paths.

Examples

Disable PR creation and just validate the update path:

jobs:
  ci-update:
    uses: athackst/ci/.github/workflows/ci_updater.yml@main
    with:
      create-pr: false
    secrets:
      token: $