Skip to content

Commit aeb6a7c

Browse files
authored
Update codeql action to v2, v1 is being deprecated
1 parent 771fd6d commit aeb6a7c

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,27 @@ jobs:
1313
analyze:
1414
name: Analyze
1515
runs-on: ubuntu-latest
16-
17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
# Override automatic language detection by changing the below list
21-
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
22-
language: ['go']
23-
# Learn more...
24-
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
16+
permissions:
17+
security-events: write
2518

2619
steps:
2720
- name: Checkout repository
28-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2922
with:
3023
# We must fetch at least the immediate parents so that if this is
3124
# a pull request then we can checkout the head.
3225
fetch-depth: 2
3326

34-
# If this run was triggered by a pull request event, then checkout
35-
# the head of the pull request instead of the merge commit.
36-
- run: git checkout HEAD^2
37-
if: ${{ github.event_name == 'pull_request' }}
38-
3927
# Initializes the CodeQL tools for scanning.
4028
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@v1
29+
uses: github/codeql-action/init@v2
4230
with:
43-
languages: ${{ matrix.language }}
31+
languages: go
4432

4533
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4634
# If this step fails, then you should remove it and run the build manually (see below)
4735
- name: Autobuild
48-
uses: github/codeql-action/autobuild@v1
36+
uses: github/codeql-action/autobuild@v2
4937

5038
# ℹ️ Command-line programs to run using the OS shell.
5139
# 📚 https://git.io/JvXDl
@@ -59,4 +47,4 @@ jobs:
5947
# make release
6048

6149
- name: Perform CodeQL Analysis
62-
uses: github/codeql-action/analyze@v1
50+
uses: github/codeql-action/analyze@v2

0 commit comments

Comments
 (0)