-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 967 Bytes
/
Copy pathcode-scan.yml
File metadata and controls
43 lines (35 loc) · 967 Bytes
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
name: "Scan"
on:
push:
branches: [ accelerator ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ accelerator ]
schedule:
- cron: '45 3 * * *'
workflow_dispatch:
jobs:
analyze:
name: Scan
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tool: [ 'grype' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Instal tools
if: matrix.tool == 'grype'
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sudo sh -s -- -b /usr/local/bin
- name: Build
run: ./mvnw -B package
- name: Perform scanning
if: matrix.tool == 'grype'
run: grype --fail-on high --config ./grype.yaml ./target/spring-petclinic-2.6.0-SNAPSHOT.jar