diff --git a/.github/workflows/compress_pngs.yml b/.github/workflows/compress_pngs.yml index e4c43562..dd515a40 100644 --- a/.github/workflows/compress_pngs.yml +++ b/.github/workflows/compress_pngs.yml @@ -1,4 +1,4 @@ -name: Compress PNGs +name: Compress PNGs 🗜️ on: schedule: diff --git a/.github/workflows/convert_svg_assets.yml b/.github/workflows/convert_svg_assets.yml deleted file mode 100644 index 415a5bad..00000000 --- a/.github/workflows/convert_svg_assets.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Convert SVG Assets - -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 "noreply@lammers.media" - git config --global user.name "Dashboard Icons Bot" - git add png/ webp/ - git commit -m ":recycle: Convert SVG assets to PNG and WEBP" || exit 0 - git pull --rebase origin ${{ github.ref_name }} - git push origin HEAD:${{ github.ref_name }} diff --git a/.github/workflows/generate_file_tree.yml b/.github/workflows/generate_file_tree.yml deleted file mode 100644 index 2e17a55b..00000000 --- a/.github/workflows/generate_file_tree.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Generate File Tree - -on: - workflow_run: - workflows: ["Convert SVG Assets"] - branches: - - main - - dev - types: - - completed - -jobs: - generate_file_tree: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - with: - ref: ${{ github.event.workflow_run.head_branch }} - - - 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 "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.event.workflow_run.head_branch }} - git push origin HEAD:${{ github.event.workflow_run.head_branch }} diff --git a/.github/workflows/generate_icons_page.yml b/.github/workflows/generate_icons_page.yml deleted file mode 100644 index 29051413..00000000 --- a/.github/workflows/generate_icons_page.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Generate Icons Page - -on: - workflow_run: - workflows: ["Convert SVG Assets"] - branches: - - main - - dev - types: - - completed - -jobs: - build_icons_page: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - with: - ref: ${{ github.event.workflow_run.head_branch }} - - - 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.event.workflow_run.head_branch }} - git push origin HEAD:${{ github.event.workflow_run.head_branch }} diff --git a/.github/workflows/update_icons_and_resources.yml b/.github/workflows/update_icons_and_resources.yml new file mode 100644 index 00000000..dbc14be5 --- /dev/null +++ b/.github/workflows/update_icons_and_resources.yml @@ -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 "noreply@lammers.media" + 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 "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 }} diff --git a/.github/workflows/validate_and_preview_icons.yml b/.github/workflows/validate_and_preview_icons.yml index c43085e8..b6970cc6 100644 --- a/.github/workflows/validate_and_preview_icons.yml +++ b/.github/workflows/validate_and_preview_icons.yml @@ -1,4 +1,4 @@ -name: Validate and Preview Icons +name: Validate and Preview Icons ✅ on: pull_request: