# PR quality pipeline.
#
# Homeboy Action owns the CI DAG so command failures aggregate instead of
# skipping later quality checks. Ordinary PR quality gates use the action-provided
# Homeboy binary instead of compiling a release binary on every pull request.

name: CI

on:
  pull_request:
    branches: [main]
  workflow_dispatch:

concurrency:
  group: ci-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

permissions:
  actions: read
  contents: write
  pull-requests: write
  issues: write

jobs:
  homeboy:
    uses: Extra-Chill/homeboy-action/.github/workflows/ci.yml@v2
    with:
      component: homeboy
      commands: audit,lint,test
      differential-gating: true
      # Autofix is explicitly disabled on PRs: an on-failure autofix push
      # lands a bot commit mid-review and supersedes in-flight CI runs,
      # which reads as a spurious failure (see #3819). Require manual fixes.
      autofix: 'false'
    secrets: inherit
