Skip to content

Commit

Permalink
🚚 Combine workflow into one
Browse files Browse the repository at this point in the history
  • Loading branch information
walkxcode committed Oct 20, 2024
1 parent 7a534ee commit 937259e
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 125 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compress_pngs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Compress PNGs
name: Compress PNGs πŸ—œοΈ

on:
schedule:
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/convert_svg_assets.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/generate_file_tree.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/generate_icons_page.yml

This file was deleted.

98 changes: 98 additions & 0 deletions .github/workflows/update_icons_and_resources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: "Update Icons and Resources ✨"

on:
push:
branches:
- main
- dev
paths:
- "svg/**"
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 "[email protected]"
git config --global user.name "Dashboard Icons Bot"
git add png/ webp/
git commit -m ":counterclockwise_arrows: Convert SVG assets to PNG and WEBP" || exit 0
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 🌳
run: python scripts/generate_folder_tree.py svg png webp

- name: Commit and Push Changes πŸ“€
run: |
git config --global user.email "[email protected]"
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 "[email protected]"
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 }}
2 changes: 1 addition & 1 deletion .github/workflows/validate_and_preview_icons.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate and Preview Icons
name: Validate and Preview Icons βœ…

on:
pull_request:
Expand Down

0 comments on commit 937259e

Please sign in to comment.