Add Cloudflare and WARP icons #8
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: Generate Icon JSON Files | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'iconset/**' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'iconset/**' | |
workflow_dispatch: | |
jobs: | |
generate-json: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install PyGithub | |
- name: Generate JSON files | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: python generate_json.py | |
- name: Commit and push if changes | |
run: | | |
git config --global user.name 'GitHub Action' | |
git config --global user.email '[email protected]' | |
git add . | |
git diff --quiet && git diff --staged --quiet || (git commit -m "Generate iconset JSON files" && git push) |