yamled 0.0.14

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.
  # A newer entry's run therefore cancels the runs of the entries ahead of it.
  # The queue merges on the result of the newest entry, whose merge-group
  # commit contains every entry ahead of it.
  #
  # That works only while the queue groups HEADGREEN. Under ALLGREEN, a
  # cancelled entry fails.
  # 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 key of the organization's reader App.
  # It 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@e9cf7ef0da4f4a9a7a6f978f5dd54be0d0d539bc # main, 2026-11-26
    permissions:
      contents: read
      # The mise action exchanges it for the mirror's session token.
      id-token: write
      issues: write
    with:
      mise-version: 2026.11.12
      runner: ubuntu-26.04
      # A pull request that changes none of these files skips the check, which
      # still reports. The list has 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
        .editorconfig
        .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 }}