Skip to content

Commit

Permalink
OWASP OWASP#714 : Adding cache restoring job in java_swagger_doc work…
Browse files Browse the repository at this point in the history
…flow file
  • Loading branch information
puneeth072003 committed Oct 27, 2023
1 parent fe76a18 commit a9d9473
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/dast-zap-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,10 @@ jobs:
id: cache-jar
uses: actions/cache@v3
with:
path: target/wrongsecrets-1.7.0-SNAPSHOT.jar
path: ./target/wrongsecrets-1.7.0-SNAPSHOT.jar
key: JarCache-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
JarCache-${{ runner.os }}-
- name: test
run: |
cd target
ls
- name: Start wrongsecrets
run: nohup ./mvnw spring-boot:run -Dspring-boot.run.profiles=without-vault &
- name: ZAP Scan
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/java_swagger_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check the cache
uses: actions/cache/restore@v3
id: cache
with:
path: ./target
key: JarCache-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
- name: Check cache hit
id: cache-hit-check
run: echo "::set-output name=cache-hit::${{ steps.cache.outputs.cache-hit }}"
- name: Set up JDK 21
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-java@v3
with:
java-version: "21"
distribution: "corretto"
- name: Clean install
if: steps.cache.outputs.cache-hit != 'true'
run: ./mvnw --no-transfer-progress clean install -DskipTests -Ddependency-check.skip -Dcyclonedx.skip=true -Dexec.skip

- name: Compile javadoc
run: ./mvnw --no-transfer-progress compile javadoc:javadoc
- name: Start wrongsecrets
Expand Down

0 comments on commit a9d9473

Please sign in to comment.