Skip to content

Commit 45014c5

Browse files
authored
Merge pull request #742 from PowerGridModel/feature/nightly-part-2
Feature/nightly part 2
2 parents 7787f4a + 73594cf commit 45014c5

File tree

7 files changed

+22
-12
lines changed

7 files changed

+22
-12
lines changed

.github/workflows/check-code-quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
merge_group:
2222

2323
concurrency:
24-
group: ${{ github.workflow }}-${{ github.ref }}
24+
group: ${{ github.workflow }}-${{ github.ref }}-code-quality
2525
cancel-in-progress: true
2626

2727
jobs:

.github/workflows/citations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
workflow_dispatch:
2222

2323
concurrency:
24-
group: ${{ github.workflow }}-${{ github.ref }}
24+
group: ${{ github.workflow }}-${{ github.ref }}-citations
2525
cancel-in-progress: true
2626

2727
jobs:

.github/workflows/clang-tidy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ on:
3535
required: true
3636

3737
concurrency:
38-
group: ${{ github.workflow }}-${{ github.ref }}
38+
group: ${{ github.workflow }}-${{ github.ref }}-clang-tidy
3939
cancel-in-progress: true
4040

4141
jobs:
@@ -77,7 +77,7 @@ jobs:
7777
- name: Set build target in case of workflow dispatch
7878
if: github.event_name == 'workflow_dispatch' || github.event.event_name == 'workflow_call'
7979
run: |
80-
echo "TARGET=${{ github.event.inputs.target }}" >> $GITHUB_ENV
80+
echo "TARGET=${{ inputs.target }}" >> $GITHUB_ENV
8181
8282
- name: Build
8383
run: |

.github/workflows/main.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,23 @@ on:
1616
merge_group:
1717
# run pipeline from another workflow
1818
workflow_call:
19+
inputs:
20+
create_release:
21+
type: boolean
22+
description: Create a (pre-)release when CI passes
23+
default: false
24+
required: false
1925
# run this workflow manually from the Actions tab
2026
workflow_dispatch:
2127
inputs:
2228
create_release:
2329
type: boolean
2430
description: Create a (pre-)release when CI passes
25-
default: true
31+
default: false
2632
required: true
2733

2834
concurrency:
29-
group: ${{ github.workflow }}-${{ github.ref }}
35+
group: ${{ github.workflow }}-${{ github.ref }}-main
3036
cancel-in-progress: true
3137

3238

@@ -305,15 +311,15 @@ jobs:
305311
run: echo "${{ steps.tag.outputs.tag }}"
306312

307313
- name: Upload wheels
308-
if: (github.event_name == 'push') || ((github.event_name == 'workflow_dispatch') && (github.event.inputs.create_release == 'true'))
314+
if: (github.event_name == 'push') || ((github.event_name == 'workflow_dispatch') && (inputs.create_release == 'true'))
309315
run: |
310316
pip install twine
311317
echo "Publish to PyPI..."
312318
twine upload --verbose wheelhouse/*
313319
314320
- name: Release
315321
uses: softprops/action-gh-release@v2
316-
if: (github.event_name == 'push') || ((github.event_name == 'workflow_dispatch') && (github.event.inputs.create_release == 'true'))
322+
if: (github.event_name == 'push') || ((github.event_name == 'workflow_dispatch') && (inputs.create_release == 'true'))
317323
with:
318324
files: |
319325
./wheelhouse/*

.github/workflows/nightly.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@ on:
1111
- cron: "0 2 * * *" # Based on UTC time
1212

1313
concurrency:
14-
group: ${{ github.workflow }}-${{ github.ref }}
14+
group: ${{ github.workflow }}-${{ github.ref }}-nightly
1515
cancel-in-progress: true
1616

1717
jobs:
1818
main:
1919
uses: "./.github/workflows/main.yml"
20+
permissions:
21+
contents: write
22+
with:
23+
create_release: false
2024

2125
clang-tidy:
2226
uses: "./.github/workflows/clang-tidy.yml"
2327
with:
2428
target: power_grid_model_c
25-
# target: "all power_grid_model_benchmark_cpp" # TODO(mgovers): re-enable when more clang-tidy stuff is fixed
29+
# target: "all power_grid_model_benchmark_cpp" # TODO(mgovers): re-enable when more clang-tidy stuff is fixed

.github/workflows/reuse-compliance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
merge_group:
1616

1717
concurrency:
18-
group: ${{ github.workflow }}-${{ github.ref }}
18+
group: ${{ github.workflow }}-${{ github.ref }}-reuse-compliance
1919
cancel-in-progress: true
2020

2121
jobs:

.github/workflows/sonar.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
merge_group:
1616

1717
concurrency:
18-
group: ${{ github.workflow }}-${{ github.ref }}
18+
group: ${{ github.workflow }}-${{ github.ref }}-sonar
1919
cancel-in-progress: true
2020

2121
jobs:

0 commit comments

Comments
 (0)