Skip to content
Latchkey

autofix.ci # needed to securely identify the workflow workflow (biomejs/biome)

The autofix.ci # needed to securely identify the workflow workflow from biomejs/biome, explained and optimized by Latchkey.

C

CI health: C - fair

The optimized version below adds run de-duplication, job timeouts.

Source: biomejs/biome.github/workflows/autofix.ymlLicense Apache-2.0View source

What it does

This is the autofix.ci # needed to securely identify the workflow workflow from the biomejs/biome repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: autofix.ci # needed to securely identify the workflow

on:
  merge_group:
  pull_request:
    branches:
      - main
      - next
    paths: # Only run when changes are made to rust code or root Cargo
      - "crates/**"
      - "fuzz/**"
      - "xtask/**"
      - "Cargo.toml"
      - "Cargo.lock"
      - "rust-toolchain.toml"
      - "rustfmt.toml"
permissions:
  contents: read

jobs:
  autofix:
    runs-on: depot-ubuntu-24.04-arm-16
    if: ${{ github.actor != 'autofix-ci[bot]' }}
    steps:
      - name: Checkout branch
        uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

      - name: Install toolchain
        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
        with:
          components: rustfmt
          cache-base: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      # Run all the codegen
      - name: Run the grammar codegen
        run: cargo codegen grammar
      - name: Run the analyzer codegen
        run: cargo codegen analyzer
      - name: Run the configuration codegen
        run: cargo codegen-configuration
      - name: Run the schema codegen
        run: cargo codegen-schema
      - name: Run the bindings codegen
        run: cargo codegen-bindings
      - name: Run the migrate codegen
        run: cargo codegen-migrate

      # Format Rust and TOML files
      - name: Run format
        run: |
          cargo fmt --all

      - uses: tombi-toml/setup-tombi@e23e1d4c5044e8c51c41ec19a5c607ab5a83cabd # v1.1.7
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Format TOML files
        run: tombi format

      - uses: autofix-ci/action@7a166d7532b277f34e16238930461bf77f9d7ed8

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: autofix.ci # needed to securely identify the workflow on:  merge_group:  pull_request:    branches:      - main      - next    paths: # Only run when changes are made to rust code or root Cargo      - "crates/**"      - "fuzz/**"      - "xtask/**"      - "Cargo.toml"      - "Cargo.lock"      - "rust-toolchain.toml"      - "rustfmt.toml"permissions:  contents: read concurrency:  group: ${{ github.workflow }}-${{ github.ref }}  cancel-in-progress: true jobs:  autofix:    timeout-minutes: 30    runs-on: latchkey-small    if: ${{ github.actor != 'autofix-ci[bot]' }}    steps:      - name: Checkout branch        uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3       - name: Install toolchain        uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0        with:          components: rustfmt          cache-base: main        env:          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}       # Run all the codegen      - name: Run the grammar codegen        run: cargo codegen grammar      - name: Run the analyzer codegen        run: cargo codegen analyzer      - name: Run the configuration codegen        run: cargo codegen-configuration      - name: Run the schema codegen        run: cargo codegen-schema      - name: Run the bindings codegen        run: cargo codegen-bindings      - name: Run the migrate codegen        run: cargo codegen-migrate       # Format Rust and TOML files      - name: Run format        run: |          cargo fmt --all       - uses: tombi-toml/setup-tombi@e23e1d4c5044e8c51c41ec19a5c607ab5a83cabd # v1.1.7        env:          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}       - name: Format TOML files        run: tombi format       - uses: autofix-ci/action@7a166d7532b277f34e16238930461bf77f9d7ed8 

What changed

  • Run on Latchkey managed runners with one line (runs-on), which apply the fixes below automatically and self-heal transient failures. This example uses latchkey-small; pick the runner size that fits the job.
  • Cancel superseded runs when a branch or PR gets a newer push.
  • Add a job timeout so a hung step cannot burn hours of runner time.

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow

actions/checkout moonrepo/setup-rust tombi-toml/setup-tombi autofix-ci/action

Frequently asked questions

What does the autofix.ci # needed to securely identify the workflow workflow (biomejs/biome) workflow do?
This is the autofix.ci # needed to securely identify the workflow workflow from the biomejs/biome repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.
What CI health grade does this workflow get?
This Automation and other workflow grades C. Paste your own workflow into the Latchkey grader to see its grade and the exact fixes.
How can I improve this Automation and other workflow?
Apply run de-duplication, job timeouts. Latchkey applies these automatically on managed runners when you point runs-on at Latchkey.

References