Skip to content

fix: fix some lint error #5

fix: fix some lint error

fix: fix some lint error #5

Workflow file for this run

name: Generate Icons
permissions:
contents: write
on:
workflow_dispatch:
push:
paths:
- "main.py"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/icon.yml"
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system deps (cairo)
run: sudo apt-get update && sudo apt-get install -y libcairo2
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
run: uv python install
- name: Install Python deps
run: uv sync
- name: Generate SVG and PNGs
run: uv run python main.py
- name: Commit to icon branch
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin icon 2>/dev/null || git branch icon
git checkout icon
git rm -rfq .
cp output/* .
rm -rf output
git add -A
git diff --quiet && git diff --staged --quiet && echo "No changes" && exit 0
git commit -m "Auto-generate icons from ${{ github.sha }}"
git push origin icon
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}