Fix reusable mise script #965
Workflow file for this run
  
    
      This file contains hidden or 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: Auto spotless check | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Set up JDK for running Gradle | |
| uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Set up gradle | |
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 | |
| with: | |
| cache-read-only: true | |
| - name: Check out PR branch | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh pr checkout ${{ github.event.pull_request.number }} | |
| - name: Spotless | |
| run: ./gradlew spotlessApply | |
| env: | |
| DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | |
| - id: create-patch | |
| name: Create patch file | |
| run: | | |
| git diff > patch | |
| if [ -s patch ]; then | |
| echo "exists=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Upload patch file | |
| if: steps.create-patch.outputs.exists == 'true' | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| path: patch | |
| name: patch |