Skip to content

Commit db773bb

Browse files
authored
Merge pull request #94 from nanotaboada/feature/codacy-analysis-cli-action
chore(ci): update Codacy workflow
2 parents 2f17d14 + 109b61a commit db773bb

File tree

1 file changed

+14
-21
lines changed

1 file changed

+14
-21
lines changed

.github/workflows/codacy.yml

+14-21
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
# This workflow uses actions that are not certified by GitHub. They are provided by a third-party and are governed by separate
2-
# terms of service, privacy policy, and support documentation.
3-
# This workflow checks out code, performs a Codacy security scan and integrates the results with the GitHub Advanced Security
4-
# code scanning feature. For more information on the Codacy security scan action usage and parameters, see
5-
# https://github.com/codacy/codacy-analysis-cli-action.
6-
# For more information on Codacy Analysis CLI in general, see https://github.com/codacy/codacy-analysis-cli.
1+
# This workflow uses actions not certified by GitHub. They are provided by a
2+
# third-party and governed by separate terms of service, privacy policy, and
3+
# support documentation. This workflow checks out code, performs a Codacy
4+
# security scan, and integrates the results with GitHub Advanced Security code
5+
# scanning feature. For more info on the Codacy Security Scan action usage and
6+
# parameters, see: https://github.com/codacy/codacy-analysis-cli-action.
7+
# For more info on Codacy Analysis CLI in general, see:
8+
# https://github.com/codacy/codacy-analysis-cli.
79

810
name: Codacy Security Scan
911

1012
on:
1113
push:
1214
branches: [ "master" ]
1315
pull_request:
14-
# The branches below must be a subset of the branches above
1516
branches: [ "master" ]
1617
schedule:
1718
- cron: '0 21 * * 5' # Runs at 21:00, only on Friday
@@ -22,33 +23,25 @@ permissions:
2223
jobs:
2324
codacy-security-scan:
2425
permissions:
25-
contents: read # for actions/checkout to fetch code
26-
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
27-
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
26+
contents: read
27+
security-events: write
28+
actions: read
2829
name: Codacy Security Scan
2930
runs-on: ubuntu-latest
3031
steps:
31-
# Checkout the repository to the GitHub Actions runner
3232
- name: Checkout code
3333
uses: actions/checkout@v4
34-
35-
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
34+
# Execute Codacy Analysis CLI and generate a SARIF output with the security
35+
# issues identified during the analysis
3636
- name: Run Codacy Analysis CLI
37-
uses: codacy/codacy-analysis-cli-action@33d455949345bddfdb845fba76b57b70cc83754b
37+
uses: codacy/codacy-analysis-cli-action@v4
3838
with:
39-
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy
40-
# repository
41-
# You can also omit the token and run the tools that support default configurations
4239
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
4340
verbose: true
4441
output: results.sarif
4542
format: sarif
46-
# Adjust severity of non-security issues
4743
gh-code-scanning-compat: true
48-
# Force 0 exit code to allow SARIF file generation
49-
# This will handover control about PR rejection to the GitHub side
5044
max-allowed-issues: 2147483647
51-
5245
# Upload the SARIF file generated in the previous step
5346
- name: Upload SARIF results file
5447
uses: github/codeql-action/upload-sarif@v3

0 commit comments

Comments
 (0)