Skip to content

Commit 7871f0d

Browse files
committed
Update CodeQL Action from v1 to v2 in README
1 parent 894face commit 7871f0d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ jobs:
5656

5757
# Initializes the CodeQL tools for scanning.
5858
- name: Initialize CodeQL
59-
uses: github/codeql-action/init@v1
59+
uses: github/codeql-action/init@v2
6060
# Override language selection by uncommenting this and choosing your languages
6161
# with:
6262
# languages: go, javascript, csharp, python, cpp, java
6363

6464
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6565
# If this step fails, then you should remove it and run the build manually (see below).
6666
- name: Autobuild
67-
uses: github/codeql-action/autobuild@v1
67+
uses: github/codeql-action/autobuild@v2
6868

6969
# ℹ️ Command-line programs to run using the OS shell.
7070
# 📚 https://git.io/JvXDl
@@ -78,14 +78,14 @@ jobs:
7878
# make release
7979

8080
- name: Perform CodeQL Analysis
81-
uses: github/codeql-action/analyze@v1
81+
uses: github/codeql-action/analyze@v2
8282
```
8383
8484
If you prefer to integrate this within an existing CI workflow, it should end up looking something like this:
8585
8686
```yaml
8787
- name: Initialize CodeQL
88-
uses: github/codeql-action/init@v1
88+
uses: github/codeql-action/init@v2
8989
with:
9090
languages: go, javascript
9191

@@ -95,23 +95,23 @@ If you prefer to integrate this within an existing CI workflow, it should end up
9595
make release
9696
9797
- name: Perform CodeQL Analysis
98-
uses: github/codeql-action/analyze@v1
98+
uses: github/codeql-action/analyze@v2
9999
```
100100
101101
### Configuration file
102102
103103
Use the `config-file` parameter of the `init` action to enable the configuration file. The value of `config-file` is the path to the configuration file you want to use. This example loads the configuration file `./.github/codeql/codeql-config.yml`.
104104

105105
```yaml
106-
- uses: github/codeql-action/init@v1
106+
- uses: github/codeql-action/init@v2
107107
with:
108108
config-file: ./.github/codeql/codeql-config.yml
109109
```
110110

111111
The configuration file can be located in a different repository. This is useful if you want to share the same configuration across multiple repositories. If the configuration file is in a private repository you can also specify an `external-repository-token` option. This should be a personal access token that has read access to any repositories containing referenced config files and queries.
112112

113113
```yaml
114-
- uses: github/codeql-action/init@v1
114+
- uses: github/codeql-action/init@v2
115115
with:
116116
config-file: owner/repo/codeql-config.yml@branch
117117
external-repository-token: ${{ secrets.EXTERNAL_REPOSITORY_TOKEN }}
@@ -122,15 +122,15 @@ For information on how to write a configuration file, see "[Using a custom confi
122122
If you only want to customise the queries used, you can specify them in your workflow instead of creating a config file, using the `queries` property of the `init` action:
123123

124124
```yaml
125-
- uses: github/codeql-action/init@v1
125+
- uses: github/codeql-action/init@v2
126126
with:
127127
queries: <local-or-remote-query>,<another-query>
128128
```
129129

130130
By default, this will override any queries specified in a config file. If you wish to use both sets of queries, prefix the list of queries in the workflow with `+`:
131131

132132
```yaml
133-
- uses: github/codeql-action/init@v1
133+
- uses: github/codeql-action/init@v2
134134
with:
135135
queries: +<local-or-remote-query>,<another-query>
136136
```

0 commit comments

Comments
 (0)