Skip to content

Commit

Permalink
Fixed caching of CVD database
Browse files Browse the repository at this point in the history
  • Loading branch information
hylkevds committed Jul 3, 2024
1 parent 64ab865 commit 1e30652
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
distribution: 'adopt'
java-version: 11

- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y-%m-%dT%H:%M:%S")" >> $GITHUB_OUTPUT
shell: bash

- name: Cache maven repository
uses: actions/cache@v4
with:
Expand All @@ -36,7 +42,8 @@ jobs:
with:
path: |
~/.m2/repository/org/owasp/dependency-check-data
key: ${{ runner.os }}-maven-owasp-cvedb
key: ${{ runner.os }}-maven-owasp-cvedb-${{ steps.get-date.outputs.date }}
restore-keys: ${{ runner.os }}-maven-owasp-cvedb

- name: Update CVD Database
env:
Expand All @@ -51,7 +58,7 @@ jobs:
with:
path: |
~/.m2/repository/org/owasp/dependency-check-data
key: ${{ runner.os }}-maven-owasp-cvedb
key: ${{ runner.os }}-maven-owasp-cvedb-${{ steps.get-date.outputs.date }}

- name: Build with Maven
env:
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/maven-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ jobs:
distribution: 'adopt'
java-version: 11

- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y-%m-%dT%H:%M:%S")" >> $GITHUB_OUTPUT
shell: bash

- name: Cache maven repository
uses: actions/cache@v4
with:
Expand All @@ -47,7 +53,8 @@ jobs:
with:
path: |
~/.m2/repository/org/owasp/dependency-check-data
key: ${{ runner.os }}-maven-owasp-cvedb
key: ${{ runner.os }}-maven-owasp-cvedb-${{ steps.get-date.outputs.date }}
restore-keys: ${{ runner.os }}-maven-owasp-cvedb

- name: Update CVD Database
env:
Expand All @@ -62,7 +69,7 @@ jobs:
with:
path: |
~/.m2/repository/org/owasp/dependency-check-data
key: ${{ runner.os }}-maven-owasp-cvedb
key: ${{ runner.os }}-maven-owasp-cvedb-${{ steps.get-date.outputs.date }}

- name: Build with Maven
env:
Expand Down
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<jackson.version>2.17.1</jackson.version>
<jackson-databind.version>2.17.1</jackson-databind.version>
<jacksonGeojson.version>1.14</jacksonGeojson.version>
<jjwt.version>0.12.5</jjwt.version>
<jjwt.version>0.12.6</jjwt.version>
<json-patch.version>1.13</json-patch.version>
<junit.version>4.13.2</junit.version>

Expand All @@ -35,10 +35,10 @@
<maven-gpg-plugin>3.2.4</maven-gpg-plugin>
<maven-javadoc-plugin.version>3.7.0</maven-javadoc-plugin.version>
<maven-nexus-staging-plugin>1.7.0</maven-nexus-staging-plugin>
<maven-release-plugin.version>3.0.1</maven-release-plugin.version>
<maven-release-plugin.version>3.1.0</maven-release-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<mockito.version>5.12.0</mockito.version>
<dependency-check-maven.version>9.2.0</dependency-check-maven.version>
<dependency-check-maven.version>10.0.1</dependency-check-maven.version>
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>

<org.eclipse.paho.client.mqttv3.version>1.2.5</org.eclipse.paho.client.mqttv3.version>
Expand Down Expand Up @@ -123,6 +123,7 @@
<failBuildOnCVSS>8</failBuildOnCVSS>
<ossIndexServerId>OWASP_OSS_INDEX</ossIndexServerId>
<nvdApiServerId>NIST_NVD_API</nvdApiServerId>
<nvdMaxRetryCount>20</nvdMaxRetryCount>
</configuration>
<executions>
<execution>
Expand Down

0 comments on commit 1e30652

Please sign in to comment.