This repository was archived by the owner on Dec 24, 2025. It is now read-only.
Merge pull request #28 from CodeStormOOP/dev #185
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: Spotless CI | |
| on: | |
| push: | |
| pull_request: | |
| types: [ opened, ready_for_review, reopened ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| if: "github.event_name != 'push' || !startsWith(github.event.head_commit.message, '[skip ci]')" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Run Spotless check | |
| run: | | |
| chmod +x gradlew | |
| ./gradlew spotlessCheck | |
| apply: | |
| runs-on: ubuntu-latest | |
| needs: check | |
| if: ${{ needs.check.result == 'failure' && github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Run Spotless apply | |
| run: | | |
| chmod +x gradlew | |
| ./gradlew spotlessApply | |
| - name: Commit and Push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add -A | |
| git commit -m "[skip ci] chore: Apply automatic code formatting" | |
| git push |