# the benefit of this over dependabot is that this also analyzes transitive dependencies
# while dependabot (at least currently) only analyzes top-level dependencies
name: OWASP dependency check (daily)

on:
  schedule:
    - cron: '30 1 * * *'
  workflow_dispatch:

jobs:
  analyze:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - uses: actions/setup-java@v3
        with:
          distribution: temurin
          java-version: 17

      - uses: gradle/gradle-build-action@v2
        with:
          arguments: "dependencyCheckAnalyze"

      - name: Upload report
        if: always()
        uses: actions/upload-artifact@v3
        with:
          path: javaagent/build/reports
