This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
chore(deps): bump actions/setup-java from 3 to 4 #267
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- src/** | |
- pom.xml | |
- .github/workflows/ci.yml | |
pull_request: | |
paths: | |
- src/** | |
- pom.xml | |
- .github/workflows/ci.yml | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: adopt | |
java-version: 17 | |
cache: maven | |
- name: Cache SonarCloud packages | |
uses: actions/[email protected] | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Verify with Maven | |
run: mvn -B -ntp verify | |
- name: Analyze using Sonar | |
if: github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: mvn -B -ntp org.sonarsource.scanner.maven:sonar-maven-plugin:sonar |