Skip to content

Commit 1d0555e

Browse files
authored
Add autoformatting of pixeebot PRs (#389)
Stole this script from another project that will automatically auto-format pixeebot PRs.
1 parent eb82b07 commit 1d0555e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Format Pixeebot PRs
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
jobs:
8+
spotless-apply:
9+
if: github.event.pull_request.user.login == 'pixeebot[bot]'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: "Setup JDK"
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: 'temurin'
21+
java-version: '17'
22+
23+
- name: 🐘Setup Gradle
24+
uses: gradle/actions/setup-gradle@v3
25+
with:
26+
cache-read-only: true
27+
28+
- name: 🎨 Run spotless via Gradle
29+
run: ./gradlew spotlessApply
30+
31+
- name: Commit and push changes
32+
uses: stefanzweifel/git-auto-commit-action@v5
33+
with:
34+
commit_message: ":art: Apply formatting"

0 commit comments

Comments
 (0)