1
0
Fork 0
mirror of https://github.com/walkxcode/dashboard-icons.git synced 2024-12-28 04:32:28 +01:00
dashboard-icons/.github/workflows/png-compression.yml
Bjorn Lammers 58a5f3f29d
💚 Fixes CI Build
Signed-off-by: Bjorn Lammers <walkxnl@gmail.com>
2023-04-23 15:26:05 +02:00

32 lines
890 B
YAML

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 ":clamp: Compresses PNGs" || exit 0
git pull --ff-only
git push