Generate Profile SVGs #348
This file contains hidden or 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 Profile SVGs | |
| on: | |
| schedule: | |
| - cron: "0 */12 * * *" | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - "config.yml" | |
| - "generator/**" | |
| jobs: | |
| generate: | |
| name: Generate galaxy profile assets | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Generate SVGs | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: python -m generator.main --demo | |
| - name: Commit and push if changed | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add assets/generated/ | |
| if ! git diff --staged --quiet; then | |
| git commit -m "chore: update profile SVGs [skip ci]" | |
| git push | |
| fi |