Skip to content

Commit 70391c3

Browse files
committed
reduce codeql runs; use separate concurrency group
1 parent d56efa0 commit 70391c3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,31 @@ name: "Code scanning - action"
22

33
on:
44
push:
5+
branches: [main]
56
pull_request:
7+
branches: [main]
68
schedule:
79
- cron: '0 0 * * 0'
810

911
concurrency:
10-
group: build-${{ github.event.pull_request.number || github.ref }}
12+
group: codeql-${{ github.event.pull_request.number || github.ref }}
1113
cancel-in-progress: true
1214

1315
jobs:
1416
CodeQL-Build:
1517

1618
runs-on: ubuntu-latest
1719

20+
permissions:
21+
security-events: write
22+
1823
steps:
1924
- name: Checkout repository
2025
uses: actions/checkout@v2
2126
with:
2227
# We must fetch at least the immediate parents so that if this is
2328
# a pull request then we can checkout the head.
2429
fetch-depth: 2
25-
26-
# If this run was triggered by a pull request event, then checkout
27-
# the head of the pull request instead of the merge commit.
28-
- run: git checkout HEAD^2
29-
if: ${{ github.event_name == 'pull_request' }}
3030

3131
# Initializes the CodeQL tools for scanning.
3232
- name: Initialize CodeQL

0 commit comments

Comments
 (0)