Skip to content

Commit

Permalink
CI: Cancel in progress jobs for other workflows (#3904)
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix committed Jun 22, 2024
1 parent 1efff48 commit acee505
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
formatting-check:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/create_release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
- .github/**
- utils/**

concurrency:
group: >-
${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

env:
OUT_DIR: ${{ github.workspace }}/../grass_outdir
GRASS: grass-${{ github.ref_name }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
labeler:
permissions:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/titles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
validate-titles:
runs-on: ubuntu-latest
Expand Down

0 comments on commit acee505

Please sign in to comment.