This repository has been archived by the owner on Jul 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
70 lines (61 loc) · 1.65 KB
/
action-test.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: "Action Test"
on:
workflow_dispatch:
inputs:
pattern1:
description: 'Include or exclude pattern'
required: true
pattern2:
description: 'Include or exclude pattern'
required: false
pattern3:
description: 'Include or exclude pattern'
required: false
pattern4:
description: 'Include or exclude pattern'
required: false
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- run: |
javatest/build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
with:
upload: False
output: sarif-results
- name: filter-sarif
uses: zbazztian/filter-sarif@master
with:
#patterns: |
# -**/*.java
# +**/*Exposed*
patterns: |
${{ github.event.inputs.pattern1 }}
${{ github.event.inputs.pattern2 }}
${{ github.event.inputs.pattern3 }}
${{ github.event.inputs.pattern4 }}
input: sarif-results/java.sarif
output: sarif-results/java.sarif
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: sarif-results/java.sarif
- name: Upload loc as a Build Artifact
uses: actions/[email protected]
with:
name: sarif-results
path: sarif-results
retention-days: 1