yamled 0.0.13

Format-preserving YAML edits: change what you meant, keep every other byte
Documentation
name: Template

on:
  # A draft pull request runs no check; marking it ready starts the run.
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]
  # A merge queue entry reports the check without running it: the shared
  # workflow skips the job, and the skip satisfies a required check.
  merge_group:
  # A tag reaches the repository through this daily run's issue, instead of
  # through a failing pull request. A push to the default branch runs nothing: its pull
  # request already ran the check.
  schedule:
    - cron: "17 9 * * *"

permissions:
  contents: read

concurrency:
  # Every merge queue entry shares one group, so a newer entry's run cancels the
  # runs of the entries ahead of it: the queue merges on the newest entry's
  # result, whose merge-group commit holds every entry ahead of it. Outside the
  # queue, a draft run gets a group of its own, so it never cancels the ready
  # run.
  group: >-
    template-${{ github.event_name == 'merge_group' && format('queue-{0}',
    github.event.merge_group.base_ref) || format('{0}-{1}{2}', github.event_name,
    github.event.pull_request.number || github.ref_name, github.event.pull_request.draft && '-draft'
    || '') }}
  cancel-in-progress: true

jobs:
  # Fails an update pull request that does not reach the newest template tag.
  # Any other pull request gets a notice; the daily run keeps an issue
  # open while the newest tag would change this repository. The shared
  # workflow reads the template with the organization's reader App's key, and
  # installs its tools through the release mirror with a session token.
  template:
    if: ${{ !github.event.pull_request.draft }}
    uses: victor-software-house/actions/.github/workflows/template-check.yml@4168002fe58fd0b310bd2b65f9db2262fc0e21d3 # main, 2026-11-11
    permissions:
      contents: read
      # The mise action exchanges it for the mirror's session token.
      id-token: write
      issues: write
    with:
      mise-version: 2026.11.6
      runner: ubuntu-latest
      # A pull request that changes none of these files skips the check, which
      # still reports. The list holds every file the template renders, whole
      # or in part. check:template-paths keeps it covering every file a render
      # keeps in step, the starters left out.
      paths: |
        .copier-answers.yml
        .changeset/config.json
        .envrc
        .github/actionlint.yaml
        .github/workflows/ci.yml
        .github/workflows/secrets.yml
        .github/workflows/template.yml
        .lefthook/**
        .miserc.toml
        .oxfmtrc.json
        .rumdl.toml
        .taplo.toml
        .typos.toml
        Cargo.toml
        bunfig.toml
        clippy.toml
        committed.toml
        deny.toml
        knip.jsonc
        lefthook.yml
        mise-tasks/**
        mise.ci.toml
        mise.dev.toml
        mise.hooks.toml
        mise.toml
        oxlint.config.ts
        rust-toolchain.toml
        rustfmt.toml
        stylex.plugin.ts
        tsconfig.json
        tsdown.config.ts
    secrets:
      RELEASE_MIRROR_URL: ${{ secrets.RELEASE_MIRROR_URL }}
      RELEASE_MIRROR_CI_KEY: ${{ secrets.RELEASE_MIRROR_CI_KEY }}
      TEMPLATES_APP_PRIVATE_KEY: ${{ secrets.TEMPLATES_APP_PRIVATE_KEY }}