Use sonar workflow_run action - Codestyle #2
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: "Codestyle" | |
# we have multiple workflows - this helps to distinguish for them | |
run-name: "${{ github.event.pull_request.title && github.event.pull_request.title || github.ref_name }} - Codestyle" | |
on: | |
push: | |
branches: [ develop, release/* ] | |
workflow_dispatch: | |
pull_request: | |
branches: [ develop ] | |
# | |
# Style-check it's a dedicated workflow. This allows us to open a PR, run all tests and fix styling issue later ;). | |
# | |
jobs: | |
check-codestyle: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Spotless | |
run: mvn spotless:check |