dashboard-icons/.github/workflows/update_icons_and_resources.yml
Meier Lukas d78286a76a
fix: remove lfs usage of tree.xml and revert to biggest possible version
Sadly we can no longer update this file as it reached 100MB and that's the max size allowed on GitHub to have files, we could only increase it further by paying for the bandwidth
2025-04-07 21:02:19 +02:00

91 lines
2.6 KiB
YAML

name: Update Icons and Resources
on:
workflow_dispatch:
jobs:
convert_assets:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Set Up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install Dependencies
run: |
pip install cairosvg pillow
- name: Run SVG to PNG and WEBP Conversion
run: python scripts/convert_svg_assets.py
- name: Commit and Push Changes
run: |
git config --global user.email "homarr-labs@proton.me"
git config --global user.name "Dashboard Icons Bot"
git add png/ webp/
git commit -m "ci(github-actions): convert SVG assets to PNG and WEBP" || exit 0
git status
git pull --rebase origin ${{ github.ref_name }}
git push origin HEAD:${{ github.ref_name }}
generate_file_tree:
needs: convert_assets
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Set Up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Commit and Push Changes
run: |
git config --global user.email "homarr-labs@proton.me"
git config --global user.name "Dashboard Icons Bot"
git add tree.json
git commit -m "ci(github-actions): generate file tree" || exit 0
git pull --rebase origin ${{ github.ref_name }}
git push origin HEAD:${{ github.ref_name }}
generate_icons_page:
needs: generate_file_tree
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Set Up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Generate ICONS.md
run: python scripts/generate_icons_page.py
- name: Commit and Push Changes
run: |
git config --global user.email "homarr-labs@proton.me"
git config --global user.name "Dashboard Icons Bot"
git add ICONS.md
git commit -m "ci(github-actions): generate ICONS.md" || exit 0
git pull --rebase origin ${{ github.ref_name }}
git push origin HEAD:${{ github.ref_name }}