forked from libgdx/libgdx
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.41 KB
/
fix-formatting.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Fix formatting
on: [push]
permissions:
contents: write
jobs:
fix-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Generate MobiVM MetalANGLE backend
run: |
./gradlew :backends:gdx-backend-robovm-metalangle:generate
./gradlew :backends:gdx-backend-robovm-metalangle:spotlessApply
- name: Commit generation changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add backends/gdx-backend-robovm-metalangle/src
git commit -m "Generate MobiVM MetalANGLE backend" -a
continue-on-error: true
- name: Apply formatter
run: ./gradlew spotlessApply
- name: Commit formatting changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m "Apply formatter" -a
continue-on-error: true
- name: Push formatting changes
uses: ad-m/github-push-action@8407731efefc0d8f72af254c74276b7a90be36e1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}