ci: accecelerate pipeline (#2078)

* enable concurrency

pr

* do not run build on draft PRs

pr

* enable fail-fast for build workflows
This commit is contained in:
Luna Yao
2026-04-08 02:43:03 +02:00
committed by GitHub
parent 371b4b70a3
commit 26b1794723
9 changed files with 43 additions and 12 deletions
+7 -1
View File
@@ -8,8 +8,13 @@ on:
- '!*-pre'
pull_request:
branches: ["develop", "main"]
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
@@ -20,6 +25,7 @@ defaults:
jobs:
cargo_fmt_check:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
@@ -35,7 +41,7 @@ jobs:
# Map a step output to a job output
outputs:
# do not skip push on branch starts with releases/
should_skip: ${{ steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/') }}
should_skip: ${{ (github.event_name == 'pull_request' && github.event.pull_request.draft) || (steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/')) }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5