File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed
Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change 3131
3232jobs :
3333 dependency-check :
34- strategy :
35- fail-fast : false
36- matrix :
37- java : [17]
38- os : [ubuntu-latest]
39- runs-on : ${{ matrix.os }}
40-
34+ if : github.event_name == 'workflow_dispatch' || github.repository == 'apache/ratis'
35+ runs-on : ubuntu-latest
4136 steps :
42- - uses : actions/checkout@v4
43- - name : Set up JDK ${{ matrix.java }}
37+ - name : Set up JDK 17
4438 uses : actions/setup-java@v4
4539 with :
4640 distribution : corretto
47- java-version : ${{ matrix.java }}
41+ java-version : 17
4842 - name : Cache Maven packages
4943 uses : actions/cache@v4
5044 with :
5145 path : ~/.m2
52- key : ${{ runner.os }} -m2-${{ hashFiles('**/pom.xml') }}
53- restore-keys : ${{ runner.os }} -m2-
46+ key : ubuntu-latest -m2-${{ hashFiles('**/pom.xml') }}
47+ restore-keys : ubuntu-latest -m2-
5448 - name : Do Maven install
5549 shell : bash
56- run : mvn clean install -DskipTests
50+ run : mvn $MAVEN_ARGS clean install -DskipTests
5751 - name : Do the dependency-check:aggregate
5852 shell : bash
59- run : mvn org.owasp:dependency-check-maven:aggregate -DossIndexUsername=${{ secrets.OSS_INDEX_USER }} -DossIndexPassword=${{ secrets.OSS_INDEX_TOKEN }}
53+ run : mvn $MAVEN_ARGS org.owasp:dependency-check-maven:aggregate -DossIndexUsername=${{ secrets.OSS_INDEX_USER }} -DossIndexPassword=${{ secrets.OSS_INDEX_TOKEN }}
6054 - name : Convert UTC to China Standard Time and Extract Date
6155 run : |
6256 utc_time="${{ github.run_started_at }}"
6559 - name : Upload Artifact
6660 uses : actions/upload-artifact@v4
6761 with :
68- name : vulnerability-check-result-${{ runner.os }}-${{ env.DATE_SHANGHAI }}
62+ name : vulnerability-check-result-${{ env.DATE_SHANGHAI }}
6963 path : target/dependency-check-report.html
7064 retention-days : 15
You can’t perform that action at this time.
0 commit comments