Update version #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Icons JSON | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'Icons/**' | |
jobs: | |
update-json: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Run Script to Generate JSON | |
run: python generate_iconlist_json.py | |
- name: Check for changes | |
id: git-check | |
run: | | |
if git diff --exit-code; then | |
echo "No changes to commit" | |
echo "changes=false" >> $GITHUB_ENV | |
else | |
echo "Changes detected" | |
echo "changes=true" >> $GITHUB_ENV | |
fi | |
- name: Commit and Push Changes | |
if: env.changes == 'true' | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: 'Automatically update iconlist JSON files' | |
branch: main |