Skip to content

Commit 2211c3d

Browse files
committed
refactor: reorganize Spotless, Dependency Guard, and screenshot push steps in CI workflow
1 parent 368954f commit 2211c3d

1 file changed

Lines changed: 25 additions & 32 deletions

File tree

.github/workflows/Build.yaml

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -75,26 +75,10 @@ jobs:
7575
- name: Apply Spotless if check failed and it's a PR
7676
id: spotless_apply
7777
continue-on-error: true
78-
# Runs if previous job failed
79-
# This will apply Spotless formatting to the codebase if the check fails
80-
# and the event is a pull request.
81-
# This is useful for ensuring that the code is always formatted correctly
82-
# before merging the pull request.
8378
if: steps.spotless_check.outcome == 'failure' && github.event_name == 'pull_request'
8479
run: |
8580
./gradlew spotlessApply :build-logic:convention:spotlessApply
8681
87-
- name: Push new Spotless Apply if available
88-
uses: stefanzweifel/git-auto-commit-action@v5
89-
continue-on-error: true
90-
# This step will push the changes made by the Spotless Apply step
91-
# to the repository if the Spotless Apply step was successful.
92-
if: steps.spotless_apply.outcome == 'success'
93-
with:
94-
file_pattern: '**/*.kt **/*.kts **/*.java **/*.xml'
95-
disable_globbing: true
96-
commit_message: "🤖 Apply Spotless formatting"
97-
9882
- name: Merge Detekt Sarif
9983
id: merge_dekekt
10084
continue-on-error: true
@@ -131,14 +115,6 @@ jobs:
131115
run: |
132116
./gradlew dependencyGuardBaseline
133117
134-
- name: Push new Dependency Guard baselines if available
135-
uses: stefanzweifel/git-auto-commit-action@v5
136-
if: steps.dependencyguard_baseline.outcome == 'success'
137-
with:
138-
file_pattern: '**/dependencies/*.txt'
139-
disable_globbing: true
140-
commit_message: "🤖 Updates baselines for Dependency Guard"
141-
142118
- name: Run all local screenshot tests
143119
id: screenshotsverify
144120
continue-on-error: true
@@ -158,14 +134,6 @@ jobs:
158134
run: |
159135
./gradlew updateFossReliantDebugScreenshotTest
160136
161-
- name: Push new screenshots if available
162-
uses: stefanzweifel/git-auto-commit-action@v5
163-
if: steps.screenshotsrecord.outcome == 'success'
164-
with:
165-
file_pattern: '*/*.png'
166-
disable_globbing: true
167-
commit_message: "🤖 Updates screenshots"
168-
169137
- name: Create Module Graph
170138
if: github.event_name == 'pull_request'
171139
run: ./gradlew createModuleGraph
@@ -246,6 +214,31 @@ jobs:
246214
files: "**/reportJvm.xml"
247215
verbose: true
248216

217+
- name: Push new Spotless Apply if available
218+
uses: stefanzweifel/git-auto-commit-action@v5
219+
continue-on-error: true
220+
if: steps.spotless_apply.outcome == 'success'
221+
with:
222+
file_pattern: '**/*.kt **/*.kts **/*.java **/*.xml'
223+
disable_globbing: true
224+
commit_message: "🤖 Apply Spotless formatting"
225+
226+
- name: Push new Dependency Guard baselines if available
227+
uses: stefanzweifel/git-auto-commit-action@v5
228+
if: steps.dependencyguard_baseline.outcome == 'success'
229+
with:
230+
file_pattern: '**/dependencies/*.txt'
231+
disable_globbing: true
232+
commit_message: "🤖 Updates baselines for Dependency Guard"
233+
234+
- name: Push new screenshots if available
235+
uses: stefanzweifel/git-auto-commit-action@v5
236+
if: steps.screenshotsrecord.outcome == 'success'
237+
with:
238+
file_pattern: '*/*.png'
239+
disable_globbing: true
240+
commit_message: "🤖 Updates screenshots"
241+
249242
androidTest:
250243
runs-on: ubuntu-latest
251244
timeout-minutes: 55

0 commit comments

Comments
 (0)