Skip to content

Commit

Permalink
fix concurrency
Browse files Browse the repository at this point in the history
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
  • Loading branch information
mgovers committed Sep 26, 2024
1 parent 92e99ac commit 895aa1e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ on:
type: string
description: "The CMake target to run (e.g.: all)"
required: true
cancel_in_progress:
type: boolean
description: Cancel this action if a newer one is kicked off
default: true
required: false
# run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
Expand All @@ -33,10 +38,15 @@ on:
- power_grid_model_api_tests
- all power_grid_model_benchmark_cpp
required: true
cancel_in_progress:
type: boolean
description: Cancel this action if a newer one is kicked off
default: true
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name != 'workflow_call' }} # parent workflow dictates concurrency
cancel-in-progress: ${{ github.event.inputs.cancel_in_progress }}

jobs:
clang-tidy:
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,34 @@ on:
merge_group:
# run pipeline from another workflow
workflow_call:
inputs:
create_release:
type: boolean
description: Create a (pre-)release when CI passes
default: false
required: false
cancel_in_progress:
type: boolean
description: Cancel this action if a newer one is kicked off
default: true
required: false
# run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
create_release:
type: boolean
description: Create a (pre-)release when CI passes
default: true
default: false
required: true
cancel_in_progress:
type: boolean
description: Cancel this action if a newer one is kicked off
default: true
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name != 'workflow_call' }} # parent workflow dictates concurrency
cancel-in-progress: ${{ github.event.inputs.cancel_in_progress }}


jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
uses: "./.github/workflows/main.yml"
permissions:
contents: write
with:
create_release: false
cancel_in_progress: false

clang-tidy:
uses: "./.github/workflows/clang-tidy.yml"
Expand Down

0 comments on commit 895aa1e

Please sign in to comment.