Trivy scan #69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Trivy scan | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '30 20 * * *' | |
jobs: | |
ubuntu-build: | |
name: Build on Ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- name: Build with Gradle | |
env: | |
packageUser: ${{ github.actor }} | |
packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew build -x check -x test | |
- name: Create lib directory if not exists | |
run: mkdir -p ballerina/lib | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@master | |
with: | |
scan-type: 'rootfs' | |
scan-ref: '/github/workspace/ballerina/lib' | |
format: 'table' | |
timeout: '10m0s' | |
exit-code: '1' |