From be062d6c9e2fbaf06f5b7a179a2e2576d50a3b5d Mon Sep 17 00:00:00 2001 From: Don Turner Date: Thu, 2 Nov 2023 11:17:19 +0000 Subject: [PATCH] Apply spotless automatically during build and commit back to PR Change-Id: Id822a3179fe866ffe2bb63157e399003f1b3ae4d --- .github/workflows/Build.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index ccea5dc4f..a19e245f8 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -34,8 +34,11 @@ jobs: - name: Setup Gradle uses: gradle/gradle-build-action@v2 - - name: Check spotless - run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache + - name: Apply formatting if failed + run: ./gradlew spotlessApply --init-script gradle/init.gradle.kts --no-configuration-cache + - uses: stefanweifel/git-auto-commit-action@v4 + with: + commit_message: Apply Spotless - name: Build all build type and flavor permutations run: ./gradlew assemble