-
-
Notifications
You must be signed in to change notification settings - Fork 12
64 lines (52 loc) · 1.78 KB
/
scans.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
name: Anchore-Grype Security Scans
on:
# push:
# branches: [ "main", "development" ]
schedule:
# Run this against the default branch every Monday at 5:30AM
- cron: '30 5 * * 2'
permissions: write-all
env:
JDK: 17
jobs:
scan:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ env.JDK }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: "8.2"
- name: Setup Environment Variables For Build Process
id: current_version
run: |
# Read Version from gradle.properties
echo "VERSION=`grep '^version=' gradle.properties | cut -d'=' -f2`" >> $GITHUB_ENV
# Stable
echo "Github Ref is $GITHUB_REF"
echo "BRANCH=main" >> $GITHUB_ENV
# Snapshot
if [ $GITHUB_REF == 'refs/heads/development' ]
then
echo "BRANCH=development" >> $GITHUB_ENV
fi
- name: Build it!
run: ./gradlew clean build --stacktrace --console=plain
- name: Scan generated packages
uses: anchore/scan-action@v3
id: securityscan
with:
path: "./build"
output-format: table
fail-build: true
# - name: Upload Anchore Report
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: ${{ steps.imagescan.outputs.sarif }}
# category: "BoxLang-Runtime-${{ github.env.BRANCH }}"