We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b5af5d commit fba909bCopy full SHA for fba909b
.github/workflows/build.yml
@@ -14,7 +14,7 @@ on:
14
branches: [ "master" ]
15
16
permissions:
17
- contents: read
+ contents: write
18
19
jobs:
20
build:
@@ -32,5 +32,20 @@ jobs:
32
- name: Setup Gradle
33
uses: gradle/actions/setup-gradle@v3
34
35
+ - name: Format code
36
+ run: ./gradlew ktlintFormat
37
+
38
- name: Execute Gradle build
39
run: ./gradlew build
40
41
+ - name: Commit formatted code
42
+ run: |
43
+ if [[ -n $(git status --porcelain) ]]; then
44
+ git config --local user.name 'github-actions[bot]'
45
+ git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
46
+ git add --all
47
+ git commit -m "gradlew ktlintFormat"
48
+ git push
49
+ else
50
+ echo "No changes to the output on this push; exiting."
51
+ fi
0 commit comments