AgentScan workflow (biomejs/biome)
The AgentScan workflow from biomejs/biome, explained and optimized by Latchkey.
A
CI health: A - excellent
Run this on Latchkey for self-healing, caching, and up to 58% lower cost.
Grade your own workflow free or run it on Latchkey →What it does
This is the AgentScan 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: AgentScan
on:
pull_request_target:
types: [ opened, reopened ]
issues:
types: [ opened ]
permissions: { }
jobs:
agentscan:
if: github.event_name != 'pull_request_target' || github.event.pull_request.user.type != 'Bot'
runs-on: ubuntu-slim
permissions:
pull-requests: write
issues: write
contents: read
steps:
- name: AgentScan
uses: MatteoGabriele/agentscan-action@51fb33d2bf6290780418ae231d7e7096ef5d8311 # v1.15.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: AgentScan on: pull_request_target: types: [ opened, reopened ] issues: types: [ opened ] permissions: { } jobs: agentscan: timeout-minutes: 30 if: github.event_name != 'pull_request_target' || github.event.pull_request.user.type != 'Bot' runs-on: ubuntu-slim permissions: pull-requests: write issues: write contents: read steps: - name: AgentScan uses: MatteoGabriele/agentscan-action@51fb33d2bf6290780418ae231d7e7096ef5d8311 # v1.15.0 with: github-token: ${{ secrets.GITHUB_TOKEN }}
What changed
- 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.