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

Run this on Latchkey for self-healing, caching, and up to 58% lower cost.

Grade your own workflow free or run it on Latchkey →
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: 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
 

What changed

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