Skip to content

sonar & release flows #2

sonar & release flows

sonar & release flows #2

Workflow file for this run

name: SonarQube Analysis
on:
pull_request:
branches: [ main, develop ]
push:
branches:
- main
- develop
jobs:
sonar:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

Check failure on line 17 in .github/workflows/sonar.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/sonar.yml

Invalid workflow file

You have an error in your yaml syntax on line 17
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Run SonarQube
run: mvn -B clean verify sonar:sonar -Dsonar.projectKey=ComputerDaddyGuy_JFileTreePrettyPrinter -Dsonar.organization=computerdaddyguy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}