Skip to content

Commit

Permalink
Add caching for OWASP dependency check data
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Jan 2, 2024
1 parent 813d0f7 commit 5dc7faa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ci-owasp-dependency-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,21 @@ jobs:
path: |
~/.m2/repository/*/*/*
!~/.m2/repository/org/apache/pulsar
key: ${{ runner.os }}-m2-dependencies-owasp-${{ hashFiles('**/pom.xml') }}
!~/.m2/repository/org/owasp/dependency-check-data
key: ${{ runner.os }}-m2-dependencies-all-${{ hashFiles('**/pom.xml') }}
lookup-only: true
restore-keys: |
${{ runner.os }}-m2-dependencies-all-${{ hashFiles('**/pom.xml') }}
${{ runner.os }}-m2-dependencies-core-modules-${{ hashFiles('**/pom.xml') }}
${{ runner.os }}-m2-dependencies-core-modules-
- name: Cache OWASP Dependency Check data
uses: actions/cache@v3
timeout-minutes: 5
with:
path: ~/.m2/repository/org/owasp/dependency-check-data
key: owasp-dependency-check-data
enableCrossOsArchive: true

- name: Set up JDK ${{ matrix.jdk || '17' }}
uses: actions/setup-java@v3
with:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/pulsar-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1359,9 +1359,19 @@ jobs:
path: |
~/.m2/repository/*/*/*
!~/.m2/repository/org/apache/pulsar
!~/.m2/repository/org/owasp/dependency-check-data
key: ${{ runner.os }}-m2-dependencies-core-modules-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-dependencies-core-modules-
- name: Cache OWASP Dependency Check data
uses: actions/cache@v3
timeout-minutes: 5
with:
path: ~/.m2/repository/org/owasp/dependency-check-data
key: owasp-dependency-check-data
enableCrossOsArchive: true

- name: Set up JDK ${{ matrix.jdk || env.CI_JDK_MAJOR_VERSION }}
uses: actions/setup-java@v3
with:
Expand Down

0 comments on commit 5dc7faa

Please sign in to comment.