forked from loopingz/aws-smtp-relay
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (48 loc) · 1.56 KB
/
test.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
name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'maven'
- name: Cache NVD Database
id: cache-nvd
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository/org/owasp/dependency-check-data
key: nvd-cache-${{ runner.os }}-${{ github.run_id }}
restore-keys: |
nvd-cache-${{ runner.os }}-
# - name: Cache Maven packages
# uses: actions/cache@v2
# with:
# path: ~/.m2
# key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml') }}
# restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn --batch-mode --update-snapshots clean verify
env:
NVD_NIST_APIKEY: ${{ secrets.NVD_NIST_APIKEY }}
SMTP_HOST: ${{ secrets.SMTP_HOST }}
SMTP_USERNAME: ${{ secrets.SMTP_USERNAME }}
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
- name: Prep package
run: mkdir staging && cp target/*.jar staging
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Package
path: staging
- name: Cache NVD Database
uses: actions/cache/save@v4
if: ${{ always() }}
with:
path: ~/.m2/repository/org/owasp/dependency-check-data
key: nvd-cache-${{ runner.os }}-${{ github.run_id }}