Skip to content

Commit 5017989

Browse files
committed
update actions
1 parent 55694a0 commit 5017989

File tree

3 files changed

+90
-55
lines changed

3 files changed

+90
-55
lines changed

.github/workflows/codacy-analysis.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# This workflow checks out code, performs a Codacy security scan
7+
# and integrates the results with the
8+
# GitHub Advanced Security code scanning feature. For more information on
9+
# the Codacy security scan action usage and parameters, see
10+
# https://github.com/codacy/codacy-analysis-cli-action.
11+
# For more information on Codacy Analysis CLI in general, see
12+
# https://github.com/codacy/codacy-analysis-cli.
13+
14+
name: Codacy Security Scan
15+
16+
on:
17+
push:
18+
branches: ["main","master"]
19+
pull_request:
20+
# The branches below must be a subset of the branches above
21+
branches: ["main","master"]
22+
schedule:
23+
- cron: "28 22 * * 4"
24+
25+
permissions:
26+
contents: read
27+
28+
jobs:
29+
codacy-security-scan:
30+
permissions:
31+
contents: read # for actions/checkout to fetch code
32+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
33+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
34+
name: Codacy Security Scan
35+
runs-on: ubuntu-latest
36+
steps:
37+
# Checkout the repository to the GitHub Actions runner
38+
- name: Checkout code
39+
uses: actions/checkout@v3
40+
41+
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
42+
- name: Run Codacy Analysis CLI
43+
uses: codacy/[email protected]
44+
with:
45+
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
46+
# You can also omit the token and run the tools that support default configurations
47+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
48+
verbose: true
49+
output: results.sarif
50+
format: sarif
51+
# Adjust severity of non-security issues
52+
gh-code-scanning-compat: true
53+
# Force 0 exit code to allow SARIF file generation
54+
# This will handover control about PR rejection to the GitHub side
55+
max-allowed-issues: 2147483647
56+
57+
# Upload the SARIF file generated in the previous step
58+
- name: Upload SARIF results file
59+
uses: github/codeql-action/upload-sarif@v2
60+
with:
61+
sarif_file: results.sarif

.github/workflows/linter.yml

-55
This file was deleted.

.github/workflows/super-linter.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This workflow executes several linters on changed files based on languages used in your code base whenever
2+
# you push a code or open a pull request.
3+
#
4+
# You can adjust the behavior by modifying this file.
5+
# For more information, see:
6+
# https://github.com/github/super-linter
7+
name: Lint Code Base
8+
9+
on:
10+
push:
11+
branches: ["main","master"]
12+
pull_request:
13+
branches: ["main","master"]
14+
jobs:
15+
run-lint:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v3
20+
with:
21+
# Full git history is needed to get a proper list of changed files within `super-linter`
22+
fetch-depth: 0
23+
24+
- name: Lint Code Base
25+
uses: github/super-linter@v4
26+
env:
27+
VALIDATE_ALL_CODEBASE: false
28+
DEFAULT_BRANCH: "main"
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)