name: IntelliJ Format on: push: branches: [ "master" ] pull_request: branches: [ "master" ] jobs: formatting: runs-on: ubuntu-latest steps: - if: github.event_name != 'pull_request' uses: actions/checkout@v4 - if: github.event_name == 'pull_request' uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} - uses: notdevcody/intellij-format-action@v1.1 with: include-glob: '*.java' path: src/main/java/ style-settings-file: ../../../.idea/codeStyles/Project.xml