1
0
Fork 0
mirror of https://github.com/walkxcode/dashboard-icons.git synced 2024-11-23 11:49:15 +01:00
dashboard-icons/.github/workflows/update_icons_and_resources.yml

100 lines
2.8 KiB
YAML
Raw Normal View History

2024-10-20 20:06:10 +02:00
name: "Update Icons and Resources ✨"
on:
push:
branches:
- main
- dev
paths:
- "svg/**"
- "png/**"
2024-10-20 20:06:10 +02:00
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
2024-10-20 20:11:16 +02:00
- name: Run SVG to PNG and WEBP Conversion ♻️
2024-10-20 20:06:10 +02:00
run: python scripts/convert_svg_assets.py
- name: Commit and Push Changes 📤
run: |
git config --global user.email "noreply@lammers.media"
git config --global user.name "Dashboard Icons Bot"
git add png/ webp/
2024-10-20 20:11:16 +02:00
git commit -m ":recycle: Convert SVG assets to PNG and WEBP" || exit 0
2024-10-20 20:06:10 +02:00
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: Generate File Tree 🌳
2024-10-20 20:10:17 +02:00
run: python scripts/generate_file_tree.py svg png webp
2024-10-20 20:06:10 +02:00
- name: Commit and Push Changes 📤
run: |
git config --global user.email "noreply@lammers.media"
git config --global user.name "Dashboard Icons Bot"
git add tree.json
git commit -m ":construction_worker: 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 "noreply@lammers.media"
git config --global user.name "Dashboard Icons Bot"
git add ICONS.md
git commit -m ":construction_worker: Generate ICONS.md" || exit 0
git pull --rebase origin ${{ github.ref_name }}
git push origin HEAD:${{ github.ref_name }}