ποΈ PNG Compression #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "[email protected]" | |
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 |