Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
44 lines
983 B
YAML
44 lines
983 B
YAML
name: Spotless
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- master
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: spotless-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
ref: ${{ github.ref_name }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: actions/setup-java@v5
|
|
with:
|
|
distribution: temurin
|
|
java-version: "25"
|
|
|
|
- uses: gradle/actions/setup-gradle@v6
|
|
|
|
- name: Apply Spotless
|
|
run: ./gradlew spotlessApply --no-daemon
|
|
|
|
- name: Commit formatting changes
|
|
run: |
|
|
if git diff --quiet; then
|
|
echo "Nothing to format."
|
|
exit 0
|
|
fi
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add -u
|
|
git commit -m "chore(style): spotlessApply"
|
|
git push |