Expand readme to include codeql-path output example
Also add example from README into workflow to confirm it is accurate.
This commit is contained in:
parent
54f3e52e8f
commit
c87f3021d4
2 changed files with 19 additions and 1 deletions
4
.github/workflows/codeql.yml
vendored
4
.github/workflows/codeql.yml
vendored
|
|
@ -15,7 +15,11 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ./init
|
- uses: ./init
|
||||||
|
id: init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
config-file: ./.github/codeql/codeql-config.yml
|
config-file: ./.github/codeql/codeql-config.yml
|
||||||
|
# example from README.md
|
||||||
|
- name: Print CodeQL Version
|
||||||
|
run: ${{steps.init.outputs.codeql-path}} version --format=json
|
||||||
- uses: ./analyze
|
- uses: ./analyze
|
||||||
|
|
|
||||||
16
README.md
16
README.md
|
|
@ -125,10 +125,24 @@ By default, this will override any queries specified in a config file. If you wi
|
||||||
queries: +<local-or-remote-query>,<another-query>
|
queries: +<local-or-remote-query>,<another-query>
|
||||||
```
|
```
|
||||||
|
|
||||||
### CodeQL Path
|
### Calling CodeQL Directly
|
||||||
|
|
||||||
The `init` action makes the path to CodeQL available as the output `codeql-path`.
|
The `init` action makes the path to CodeQL available as the output `codeql-path`.
|
||||||
|
|
||||||
|
With this you can access the `codeql` binary:
|
||||||
|
|
||||||
|
<!-- this example is run via .github/workflows/codeql.yml -->
|
||||||
|
```yaml
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
id: init
|
||||||
|
with:
|
||||||
|
languages: javascript
|
||||||
|
|
||||||
|
- name: Print CodeQL Version
|
||||||
|
run: ${{steps.init.outputs.codeql-path}} version --format=json
|
||||||
|
```
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
Read about [troubleshooting code scanning](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning).
|
Read about [troubleshooting code scanning](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning).
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue