Update maven.yml #3
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: Java CI with Maven | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
trivy_fs_scan: | |
runs-on: self-hosted # You can choose a different operating system if needed | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 # This step checks out your repository's code | |
- name: Run Shell Commands | |
run: | | |
trivy fs --format table -o trivy.report . |