Skip to content

Snyk scheduled test #137

Snyk scheduled test

Snyk scheduled test #137

name: Snyk scheduled test
on:
schedule:
- cron: '0 2 * * 1'
push:
branches:
- master
jobs:
security:
runs-on: ubuntu-latest
defaults:
run:
working-directory: java-sdk
env:
REPORT_FILE: test.json
steps:
- uses: actions/checkout@v3
- uses: snyk/actions/setup@master
with:
snyk-version: v1.1032.0
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run Snyk
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: >
snyk test
--all-sub-projects
--configuration-matching='^runtimeClasspath$'
--fail-on=upgradable
--json-file-output=${{ env.REPORT_FILE }}
--org=radar-base
--policy-path=$PWD/.snyk
- name: Report new vulnerabilities
uses: thehyve/report-vulnerability@master
if: success() || failure()
with:
report-file: ${{ env.REPORT_FILE }}
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}