1
0
Fork 0
mirror of https://github.com/walkxcode/dashboard-icons.git synced 2024-11-14 07:37:57 +01:00
dashboard-icons/.github/workflows/compress_pngs.yml
Bjorn Lammers 1562dd77d5
💚 Fixes dev runs
2024-10-20 19:34:53 +02:00

37 lines
876 B
YAML

name: Compress PNGs 🗜️
on:
schedule:
- cron: "0 0 * * 0"
push:
branches:
- main
- dev
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