Skip to content

Dependency check

Dependency check #301

name: Dependency check
on:
push:
branches: [master]
schedule:
- cron: "0 8 * * *" # UTC
jobs:
dependency-check:
if: github.repository != 'tmfg/digitraffic-rail-graphql'
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: corretto
cache: maven
- name: Cache dependency-check files
uses: actions/cache@v4
with:
path: ~/.m2/repository/org/owasp
key: ${{ runner.os }}-dependency-check-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-dependency-check-
- name: Dependency check
run: mvn -Pdepcheck
env:
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
- name: Publish report on GitHub Pages
if: ${{ success() || failure() }}
uses: tmfg/digitraffic-actions@gh-pages-publish/v1
with:
GH_PAGES_BRANCH: gh-pages
FILE_PATH: target/dependency-check-report.html
COMMIT_MESSAGE: Upload dependency check report
LINK_TEXT: Dependency check report
- name: Notify Slack
if: failure()
uses: 8398a7/action-slack@v3
with:
status: failure
text: FAILED Rail GraphQL Dependency Check
fields: repo, job, took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}