diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81c1c4f..1d27277 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,20 @@ name: CI on: push: - branches: [master] + branches: [master, main] pull_request: - branches: [master] + branches: [master, main] + paths: + - '**/*.rs' + - '**/Cargo.toml' + - '**/Cargo.lock' + - '.github/workflows/**' + - 'Makefile' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true env: CARGO_TERM_COLOR: always @@ -100,9 +111,10 @@ jobs: echo "- Setpoints: **${SETPOINTS}**" >> "$GITHUB_STEP_SUMMARY" echo "- Governance files: ✅" >> "$GITHUB_STEP_SUMMARY" - # Gate 5: Build verification + # Gate 5: Build verification (skip on PRs — release.yml handles tagged builds) build: name: Build (${{ matrix.target }}) + if: github.event_name != 'pull_request' runs-on: ${{ matrix.os }} strategy: matrix: @@ -131,6 +143,7 @@ jobs: docker: name: Docker Build + if: github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb12b4c..e5b8bb3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,10 @@ on: push: tags: ["v*"] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: write