forked from PSMRI/Identity-API
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.25 KB
/
sast-and-package.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
name: Static Code Analysis and Packaging
on:
push:
branches: [ "develop" ]
env:
ENV_VAR: test
jobs:
CodeQL:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: Java
- name: Build with Maven
run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Packaging:
needs: codeql
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'
- name: Test with maven
run: mvn test
- name: Create WAR file
run: mvn -B package --file pom.xml
- name: Upload WAR file as artifact
uses: actions/upload-artifact@v2
with:
name: Identity-API
path: target/identity-0.0.1.war