-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.08 KB
/
ci-config.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
name: GitHub CI
on:
# Build pull requests for any branch
pull_request: { }
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
# Set up the Java environment
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
# Use a cache for the local Maven repository
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Generate Cache Name
shell: bash
run: echo "CACHE_NAME=$(date '+%y.%j')" >> $GITHUB_ENV
- name: Restore NVD data cache
uses: actions/cache@v4
with:
key: nvd-data-${{ env.CACHE_NAME }}
restore-keys: nvd-data-
path: ./data/cache
# Build the software
- name: Build with Maven
run: mvn -B -ntp verify -Dnvd.api.datafeed="file:${GITHUB_WORKSPACE}/data/cache/nvdcve-{0}.json.gz"