-
Notifications
You must be signed in to change notification settings - Fork 24
37 lines (33 loc) · 1.08 KB
/
pr-icon-updates.yml
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: '🎨 PR icon updates'
on:
push:
branches: [ "chore-updated-icons" ]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
GH_TOKEN: ${{ github.token }}
FILE: 'spark-icons/src/main/kotlin/com/adevinta/spark/icons/SparkIcons.kt'
jobs:
pr-icon-updates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: chore-updated-icons
fetch-depth: 0
- run: gh pr create --fill
continue-on-error: true
- run: |
./scripts/spark-icons-kt/spark-icons-kt.main.kts --input=spark-icons/src/main/res/drawable --output="$FILE" --copyright=scripts/spark-icons-kt/COPYRIGHT.kt
if ! git diff --quiet --exit-code -- "$FILE" ;
then
git config user.name 'spark-ui-bot'
git config user.email '[email protected]'
git commit "$FILE" -m "🎨 Update `SparkIcons.kt`"
git show
git push
echo "::notice::UPDATED"
else
echo "::notice::UP-TO-DATE"
fi