Files
codex-proxy-rs/.github/workflows/ci.yml
T
ZyyandCodex 9e57f78bab ci: speed up validation pipelines
Run affected CI checks in parallel and skip unrelated backend or frontend work while retaining workflow lint.

Start release binary builds after release metadata is available, while keeping image assembly, packaging, and publication gated by quality checks.

Co-authored-by: Codex <noreply@openai.com>
2026-07-16 16:07:55 +08:00

71 lines
1.9 KiB
YAML

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
backend: ${{ steps.filter.outputs.backend }}
frontend: ${{ steps.filter.outputs.frontend }}
container: ${{ steps.filter.outputs.container }}
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
- name: Detect affected checks
id: filter
uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
with:
filters: |
backend:
- 'backend/**'
- 'release/version.yaml'
- '.github/workflows/**'
frontend:
- 'frontend/**'
- '.github/workflows/**'
container:
- 'backend/**'
- 'frontend/**'
- 'deploy/**'
- '.dockerignore'
- 'release/version.yaml'
- '.github/workflows/_container.yml'
- '.github/workflows/ci.yml'
quality:
needs: changes
uses: ./.github/workflows/_quality.yml
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
run_backend: ${{ needs.changes.outputs.backend == 'true' }}
run_frontend: ${{ needs.changes.outputs.frontend == 'true' }}
container:
needs: changes
if: needs.changes.outputs.container == 'true'
permissions:
contents: read
security-events: write
uses: ./.github/workflows/_container.yml
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}