-
-
Notifications
You must be signed in to change notification settings - Fork 158
37 lines (35 loc) · 1.2 KB
/
Copy pathscreenshots.yml
File metadata and controls
37 lines (35 loc) · 1.2 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
36
37
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
# leftover lint errors (not auto-fixable) must not skip screenshot updates
- run: ./gradlew :composeApp:lintFix :android:lintFix
continue-on-error: true
- 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: lintFix and refresh Paparazzi screenshots [skip ci]"
git push