Skip to content

Bump aquasecurity/trivy-action from 0.33.1 to 0.34.0 #123

Bump aquasecurity/trivy-action from 0.33.1 to 0.34.0

Bump aquasecurity/trivy-action from 0.33.1 to 0.34.0 #123

Workflow file for this run

name: Build
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
- 'hotfix/v*.*.*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17', '21', '25' ]
steps:
- name: Checkout project
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: maven
server-id: central
server-username: SONATYPE_USERNAME
server-password: SONATYPE_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Cache SonarQube packages
uses: actions/cache@v5
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Lint
run: mvn spotless:check
- name: Build
run: mvn clean package
- name: Publish test report
if: always()
uses: mikepenz/action-junit-report@v6
with:
report_paths: '**/target/surefire-reports/TEST-*.xml'
- name: Sonar
if: matrix.java == '17' && github.event.pull_request.head.repo.fork == false
run: mvn verify sonar:sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Metadata
if: matrix.java == '17' && github.ref == 'refs/heads/main'
id: metadata
run: echo current_version=$(echo $(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)) >> $GITHUB_OUTPUT
- name: Deploy
if: matrix.java == '17' && github.ref == 'refs/heads/main' && endsWith(steps.metadata.outputs.current_version, '-SNAPSHOT')
run: mvn -B deploy -DskipTests -Psign
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}