🚀 Much needed maintenance

This commit is contained in:
Bjorn Lammers
2024-10-20 19:24:03 +02:00
parent 8d414fa3ef
commit 442e8f9d77
4993 changed files with 53535 additions and 3548 deletions

View File

@@ -1,32 +1,34 @@
name: "\U0001FA79 Requests & Suggestions"
name: "🔍 Requests & Suggestions"
description: Suggest an icon or request changes
labels: "\U0001FA79 Requests & Suggestions"
labels: "🔍 Requests & Suggestions"
assignees: walkxcode
body:
- type: markdown
attributes:
value: "Thank you for your interest in contributing to our icon repository! To ensure smooth collaboration, we've established clear guidelines for contributors.\n## 🌟 Icon Specifications\n\n- Icons should be provided in both `PNG` and `SVG` formats. Formats like `JPEG` or `WEBP` will not be accepted.\n - If an `SVG` version is unavailable, a `PNG` version alone suffices.\n - Conversely, if a `PNG` version is missing, it can be generated using [Ezgif SVG to PNG](https://github.com/walkxcode/dashboard-icons/blob/main/CONTRIBUTING.md#-converting-svg-to-png).\n\n- `PNG` files should have a height of exactly `512px` Width can vary, but a 1:1 aspect ratio is preferred.\n - ❗ Exceptions for upscales will be made only if the correct or a downscaled version cannot be obtained.\n - Downsizing can be accomplished using [iLoveIMG Resize](https://github.com/walkxcode/dashboard-icons/blob/main/CONTRIBUTING.md#-downscaling-pngs).\n\n- Icons should be named using the [Kebab Case](https://wiki.c2.com/?KebabCase) convention, reflecting their full name. For instance, \"Facebook Messenger\" should be named `facebook-messenger.png`.\n\n- Monochrome icons should default to a dark version. Light versions should be named `name-light.png`. If a light version is absent, utilize [https://pinetools.com/colorize-image](https://pinetools.com/colorize-image) to adjust its color.\n"
value: |
Thank you for your interest in contributing to our icon repository! To ensure smooth collaboration, please make sure to read and agree to our [Contribution Guidelines](https://github.com/walkxcode/dashboard-icons/blob/main/CONTRIBUTING.md) before submitting your request.
- type: checkboxes
attributes:
label: Contribution Guidelines
options:
- label: I have read and agree to the [Contribution Guidelines](https://github.com/walkxcode/dashboard-icons/blob/main/CONTRIBUTING.md)
- label: "I have read and agree to the [Contribution Guidelines](https://github.com/walkxcode/dashboard-icons/blob/main/CONTRIBUTING.md)"
required: true
- type: textarea
id: icon-name
attributes:
label: Icon Name
description: What is the name of the icon you are contributing?
description: What is the name of the icon you are requesting or suggesting?
placeholder: Enter icon name here
validations:
required: true
- type: textarea
id: icons
id: icon-details
attributes:
label: Icon(s)
description: >-
Upload your icons here. You can do this by Copy-Pasting or Drag &
Dropping the images.
placeholder: Copy-Paste or Drag & Drop images here!
label: Icon Details
description: Provide any additional details or context for the icon request.
placeholder: Enter details here
validations:
required: false

33
.github/workflows/compress_pngs.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Compress PNGs 🗜️
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
jobs:
compress_pngs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y zopfli
- name: Compress PNG Files
run: |
echo "Compressing PNGs..."
find png/ -iname "*.png" -print0 | xargs -0 -P 4 -I{} zopflipng -y {} {}
- 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/
git commit -m ":compression: Compressed PNGs" || exit 0
git pull --rebase
git push

View File

@@ -0,0 +1,31 @@
name: Generate File Tree 🌳
on:
push:
branches:
- main
workflow_dispatch:
jobs:
generate_file_tree:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set Up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Generate File Tree
run: python scripts/generate_file_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 push

View File

@@ -0,0 +1,31 @@
name: Generate Icons Page 🚀
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build_icons_page:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- 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 push

View File

@@ -1,32 +0,0 @@
name: 🚀 Generates ICONS
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
architecture: "x64"
- name: ICONS Generator
run: |-
python config/ci.py
cat ICONS.md
- name: Load to GitHub
run: |-
git diff
git config --global user.email "noreply@lammers.media"
git config --global user.name "Dashboard Icons Bot"
git add -A
git commit -m ":construction_worker: Generates ICONS.md" || exit 0
git push

View File

@@ -1,32 +0,0 @@
name: 🗜️ PNG Compression
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
jobs:
compress-images:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y zopfli
- name: Compress PNGs
run: |
echo "Compressing PNGs..."
find png/ -iname "*.png" -print0 | xargs -0 -P 4 -I{} sh -c 'echo "Compressing {}"; zopflipng -y {} {}' || true
- name: Load to GitHub
run: |-
git diff
git config --global user.email "noreply@walkx.fyi"
git config --global user.name "Dashboard Icons Bot"
git add -A
git commit -m ":children_crossing: Compresses PNGs" || exit 0
git pull --ff-only
git push

View File

@@ -0,0 +1,72 @@
name: Validate and Preview Icons 🛠️
on:
pull_request:
types: [opened, synchronize]
jobs:
validate_icons:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- 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: Upload Converted Icons
uses: actions/upload-artifact@v3
with:
name: converted-icons
path: |
png/*.png
webp/*.webp
- name: Post Comment with Preview
uses: marocchino/sticky-pull-request-comment@v2
with:
message: |
## Icon Conversion Results
**Total Icons Processed:** ${{ steps.process.outputs.total_icons }}
**Converted PNGs:** ${{ steps.process.outputs.converted_pngs }}
**Converted WEBPs:** ${{ steps.process.outputs.converted_webps }}
**Removed PNGs:** ${{ steps.process.outputs.removed_pngs }}
**Removed WEBPs:** ${{ steps.process.outputs.removed_webps }}
${{ steps.process.outputs.failed_files }}
### Preview of Converted Icons:
${{ steps.preview.outputs.icon_previews }}
- name: Set Output Variables
id: process
run: |
echo "::set-output name=total_icons::$(grep 'Total icons:' output.log | awk '{print $3}')"
echo "::set-output name=converted_pngs::$(grep 'Converted' output.log | awk '{print $2}')"
echo "::set-output name=converted_webps::$(grep 'Converted' output.log | awk '{print $5}')"
echo "::set-output name=removed_pngs::$(grep 'Removed' output.log | awk '{print $2}')"
echo "::set-output name=removed_webps::$(grep 'Removed' output.log | awk '{print $5}')"
echo "::set-output name=failed_files::$(grep 'The following files failed' -A 10 output.log)"
- name: Generate Icon Previews
id: preview
run: |
ICONS=$(find png/ -type f -name "*.png")
PREVIEWS=""
for ICON in $ICONS; do
ICON_NAME=$(basename $ICON)
PREVIEW="![${ICON_NAME}](https://raw.githubusercontent.com/walkxcode/dashboard-icons/${{ github.event.pull_request.head.ref }}/png/${ICON_NAME})"
PREVIEWS="$PREVIEWS $PREVIEW"
done
echo "::set-output name=icon_previews::$PREVIEWS"