-
Notifications
You must be signed in to change notification settings - Fork 12
35 lines (33 loc) · 1.06 KB
/
test.yml
File metadata and controls
35 lines (33 loc) · 1.06 KB
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
name: Screenshots
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
screenshots:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && github.actor != 'github-actions[bot]'"
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref }}
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- uses: android-actions/setup-android@v3
- uses: gradle/actions/setup-gradle@v4
- run: ./gradlew spotlessApply
- run: ./gradlew :screenshotTests:updateScreenshots
- name: Auto-commit if changed
if: github.event_name == 'push'
run: |
git diff --quiet && exit 0
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "Auto-fix: spotlessApply and updateScreenshots [skip ci]"
git push