-
Notifications
You must be signed in to change notification settings - Fork 62
60 lines (56 loc) · 1.6 KB
/
codeql-analysis.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
name: CodeQL
'on':
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: 48 18 * * 6
workflow_dispatch: null
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
concurrency: ${{ github.workflow }}-${{ matrix.language }}-${{ github.ref }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language:
- ruby
- javascript
steps:
- name: Run Code Scanning
uses: department-of-veterans-affairs/codeql-tools/codeql-analysis@main
with:
language: ${{ matrix.language }}
config-file: ./.github/codeql/config.yml
assign-failure-label:
if: github.event_name == 'pull_request' && failure() && !contains(github.event.pull_request.labels.*.name, 'codeql-failure')
needs: [analyze]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Add Failure label
uses: actions-ecosystem/action-add-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
codeql-failure
remove-failure-label:
if: github.event_name == 'pull_request' && success() && contains(github.event.pull_request.labels.*.name, 'codeql-failure')
needs: [analyze]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Remove Failure label
uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
codeql-failure