Skip to content

Commit 5dfe9ab

Browse files
committed
Updated gitab workflow
1 parent b901f02 commit 5dfe9ab

1 file changed

Lines changed: 18 additions & 11 deletions

File tree

.github/workflows/maven.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,24 @@ jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@master
17-
- name: Set up JDK 21
18-
uses: actions/setup-java@v1
16+
- name: Repository checkout
17+
uses: actions/checkout@v4
18+
- name: Cache local Maven repository
19+
uses: actions/cache@v4
20+
with:
21+
path: ~/.m2/repository
22+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
23+
restore-keys: ${{ runner.os }}-maven-
24+
- name: Set up JDK
25+
uses: actions/setup-java@v4
1926
with:
2027
java-version: 21
21-
cache: 'maven'
22-
- name: Build with Maven
23-
run: mvn clean verify
24-
- name: OWASP check
28+
distribution: 'adopt'
29+
- name: OWASP Dependency Checks
2530
env:
26-
OWASP_API_KEY: ${{ secrets.OWASP_API_KEY }}
27-
run: |
28-
mvn dependency-check:check -DnvdApiKey=$OWASP_API_KEY
29-
- uses: codecov/codecov-action@v2
31+
API_KEY: ${{ secrets.OWASP_API_KEY }}
32+
run: mvn --batch-mode org.owasp:dependency-check-maven:check -DnvdApiKey="$OWASP_API_KEY"
33+
- name: Build with Maven
34+
run: mvn --batch-mode --update-snapshots package
35+
- name: Code coverage with Codecov
36+
uses: codecov/codecov-action@v4

0 commit comments

Comments
 (0)