2023-04-17 00:04:08 +02:00
|
|
|
name: 🗜️ PNG Compression
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
2024-04-03 13:06:39 +02:00
|
|
|
- cron: "0 0 * * 0"
|
2023-04-17 00:04:08 +02:00
|
|
|
workflow_dispatch:
|
2024-04-03 13:06:39 +02:00
|
|
|
|
2023-04-17 00:04:08 +02:00
|
|
|
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
|
2024-04-03 13:06:39 +02:00
|
|
|
|
2023-04-17 00:04:08 +02:00
|
|
|
- name: Compress PNGs
|
|
|
|
run: |
|
2024-04-03 13:06:39 +02:00
|
|
|
echo "Compressing PNGs..."
|
2023-04-17 00:04:08 +02:00
|
|
|
find png/ -iname "*.png" -print0 | xargs -0 -P 4 -I{} sh -c 'echo "Compressing {}"; zopflipng -y {} {}' || true
|
2024-04-03 13:06:39 +02:00
|
|
|
|
2023-04-17 00:04:08 +02:00
|
|
|
- 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
|
2024-04-03 13:06:39 +02:00
|
|
|
git commit -m ":children_crossing: Compresses PNGs" || exit 0
|
2023-04-23 15:26:05 +02:00
|
|
|
git pull --ff-only
|
2023-04-17 00:04:08 +02:00
|
|
|
git push
|