File tree Expand file tree Collapse file tree 2 files changed +49
-5
lines changed Expand file tree Collapse file tree 2 files changed +49
-5
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright 2024 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ name : Apply spotless
15
+
16
+ on :
17
+ pull_request :
18
+ branches : [ '*' ]
19
+ workflow_dispatch :
20
+ concurrency :
21
+ group : ${{ github.workflow }}-${{ github.ref }}
22
+ cancel-in-progress : true
23
+
24
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
25
+ jobs :
26
+ apply-spotless :
27
+ runs-on : ubuntu-latest
28
+ timeout-minutes : 30
29
+ if : github.repository == 'android/snippets'
30
+
31
+ steps :
32
+ - name : Checkout Repository
33
+ uses : actions/checkout@v3
34
+ with :
35
+ token : ${{ secrets.PAT || github.token }}
36
+
37
+ - name : set up Java 17
38
+ uses : actions/setup-java@v2
39
+ with :
40
+ distribution : ' zulu'
41
+ java-version : ' 17'
42
+
43
+ - name : Run spotlessApply
44
+ run : ./gradlew :compose:spotlessApply --init-script gradle/init.gradle.kts --no-configuration-cache --stacktrace
45
+
46
+ - name : Auto-commit if spotlessApply has changes
47
+ uses : stefanzweifel/git-auto-commit-action@v4
48
+ with :
49
+ commit_message : Apply Spotless
Original file line number Diff line number Diff line change 37
37
with :
38
38
distribution : ' zulu'
39
39
java-version : ' 17'
40
- - name : Apply formatting if failed
41
- run : ./gradlew :compose:spotlessApply --init-script gradle/init.gradle.kts --no-configuration-cache --stacktrace
42
- - uses : stefanzweifel/git-auto-commit-action@v4
43
- with :
44
- commit_message : Apply Spotless
45
40
- name : Build Compose
46
41
run : ./gradlew :compose:snippets:build
47
42
- name : Build recompose snippets
You can’t perform that action at this time.
0 commit comments