Skip to content

Commit 2f4603f

Browse files
committed
✨ Add GitHub Actions workflow for asset generation from SVG icons
1 parent 05b5174 commit 2f4603f

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/generate-assets.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ on:
2020
jobs:
2121
generate-assets:
2222
runs-on: ubuntu-latest
23+
permissions:
24+
contents: write
2325

2426
steps:
2527
- name: Checkout repository
2628
uses: actions/checkout@v4
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
2731

2832
- name: Set up Python
2933
uses: actions/setup-python@v4
@@ -50,13 +54,11 @@ jobs:
5054
run: python scripts/generate_assets.py
5155

5256
- name: Commit and push changes
53-
run: |
54-
git config --local user.email "[email protected]"
55-
git config --local user.name "Sugeng Sulistiyawan"
56-
git add assets/
57-
if git diff --staged --quiet; then
58-
echo "No changes to commit"
59-
else
60-
git commit -m "Auto-generate assets from SVG icons"
61-
git push
62-
fi
57+
uses: stefanzweifel/git-auto-commit-action@v5
58+
with:
59+
commit_message: "Auto-generate assets from SVG icons"
60+
commit_user_name: "Sugeng Sulistiyawan"
61+
commit_user_email: "[email protected]"
62+
commit_author: "Sugeng Sulistiyawan <[email protected]>"
63+
file_pattern: "assets/"
64+
skip_dirty_check: false

0 commit comments

Comments
 (0)