-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (36 loc) · 1.01 KB
/
analyze-detekt.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Scan with detekt
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '00 6 * * 1'
jobs:
scan:
name: Scan
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Setup detekt
id: setup
run: |
JARFILE="$(mktemp -d)/detekt.jar"
curl --request GET \
--url https://github.com/detekt/detekt/releases/download/v1.17.1/detekt-cli-1.17.1-all.jar \
--silent \
--location \
--output $JARFILE
echo "jarfile=$JARFILE" >> $GITHUB_OUTPUT
- name: Run detekt
continue-on-error: true
run: |
java -jar ${{ steps.setup.outputs.jarfile }} \
--input ${{ github.workspace }} \
--report sarif:${{ github.workspace }}/detekt.sarif.json
- name: Upload results
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: ${{ github.workspace }}/detekt.sarif.json
checkout_path: ${{ github.workspace }}