mirror of
https://github.com/Sea-Haven-Industries/.github.git
synced 2026-09-30 07:03:11 +00:00
Add cancel-in-progress concurrency to reusable CI (#38)
Superseded CI runs on the same ref keep consuming runners and delay feedback on the latest push. Add a job-level concurrency group keyed on github.workflow and github.ref so a new push cancels the in-flight CI run for that branch. Concurrency is set at the job level rather than the workflow level because these are workflow_call reusable workflows: workflow-level concurrency would resolve github.workflow against the caller's context, collapsing unrelated callers into one group. cd-* deploy workflows are intentionally left untouched to avoid cancelling in-flight deploys.
This commit is contained in:
parent
7aab740e59
commit
62d82eae29
3 changed files with 9 additions and 0 deletions
3
.github/workflows/ci-dotnet.yaml
vendored
3
.github/workflows/ci-dotnet.yaml
vendored
|
|
@ -24,6 +24,9 @@ jobs:
|
|||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
concurrency:
|
||||
group: ci-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
|
|
|
|||
3
.github/workflows/ci-python-sam.yaml
vendored
3
.github/workflows/ci-python-sam.yaml
vendored
|
|
@ -48,6 +48,9 @@ jobs:
|
|||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
concurrency:
|
||||
group: ci-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
|
|
|
|||
3
.github/workflows/ci-typescript-cdk.yaml
vendored
3
.github/workflows/ci-typescript-cdk.yaml
vendored
|
|
@ -60,6 +60,9 @@ jobs:
|
|||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
concurrency:
|
||||
group: ci-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue