-
Notifications
You must be signed in to change notification settings - Fork 11
41 lines (38 loc) · 1.28 KB
/
shiftleft-win.yml
File metadata and controls
41 lines (38 loc) · 1.28 KB
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
# This workflow integrates ShiftLeft with GitHub
# Visit https://docs.shiftleft.io for help
name: Analyze with ShiftLeft Inspect on Windows
on:
push:
branches:
- master
- feature/*
- fix/*
pull_request:
branches:
- master
jobs:
Inspect-Win-Build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
# We are building this application with Java 11
- name: Setup Java JDK
uses: actions/setup-java@v1.4.3
with:
java-version: 11.0.x
- name: Package with maven
run: mvn compile package
- name: Download ShiftLeft cli
run: |
Invoke-WebRequest -Uri 'https://www.shiftleft.io/download/sl-latest-windows-x64.zip' -OutFile sl.zip
Expand-Archive -Path sl.zip -DestinationPath .
# ShiftLeft requires Java 1.8. Post the package step override the version
- name: Setup Java JDK
uses: actions/setup-java@v1.4.3
with:
java-version: 1.8
- name: Analyze with Inspect
run: .\sl analyze --no-diagnostic --verbose --force --app ShiftLeftJavaWin --tag branch=${GITHUB_REF} --java --cpg target\hello-shiftleft-0.0.1.jar
env:
SHIFTLEFT_ORG_ID: ${{ secrets.SHIFTLEFT_ORG_ID }}
SHIFTLEFT_ACCESS_TOKEN: ${{ secrets.SHIFTLEFT_ACCESS_TOKEN }}