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 grade
- 69/100
- Health score
- 1
- Job per trigger
- 2
- Fixes in the optimized version
In short
- CI health: C (fair)
- The optimized version below adds run de-duplication and job timeouts.
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
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@7a166d7532b277f34e16238930461bf77f9d7ed8The 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
- 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. It runs on arm64, which Latchkey does not offer, so that one stays where it is. Grade your own workflow to price the jobs you run.
Actions used in this workflow
- actions/checkout
- moonrepo/setup-rust
- tombi-toml/setup-tombi
- autofix-ci/action