Skip to content

Commit 1b93bfb

Browse files
authored
Merge PR #6028: Backport "Merge PR #6027: CI(github-actions): Avoid duplicate runs"
2 parents 33ed268 + b6849f4 commit 1b93bfb

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,21 @@ env:
1111

1212

1313
jobs:
14+
pre_run:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
18+
steps:
19+
- id: skip_check
20+
uses: fkirc/skip-duplicate-actions@v5
21+
with:
22+
concurrent_skipping: same_content_newer
23+
skip_after_successful_duplicate: 'true'
24+
1425
build:
26+
needs: pre_run
27+
if: needs.pre_run.outputs.should_skip != 'true'
28+
1529
strategy:
1630
fail-fast: false
1731
matrix:

.github/workflows/code-ql.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,33 @@ env:
66
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
77
BUILD_TYPE: Release
88
CMAKE_OPTIONS: |
9-
-Dtests=OFF -Dsymbols=ON
9+
-Dtests=OFF -Dsymbols=ON -Dwarnings-as-errors=OFF
1010
1111
jobs:
12+
pre_run:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
16+
steps:
17+
- id: skip_check
18+
uses: fkirc/skip-duplicate-actions@v5
19+
with:
20+
concurrent_skipping: same_content_newer
21+
skip_after_successful_duplicate: 'true'
22+
1223
CodeQL-Build:
13-
runs-on: ubuntu-20.04
24+
needs: pre_run
25+
if: needs.pre_run.outputs.should_skip != 'true'
26+
27+
runs-on: ubuntu-latest
28+
29+
permissions:
30+
security-events: write
31+
actions: read
32+
contents: read
1433

1534
steps:
16-
- uses: actions/checkout@v2
35+
- uses: actions/checkout@v3
1736
with:
1837
submodules: 'recursive'
1938

0 commit comments

Comments
 (0)