π Fixes file path #4
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: Compress PNGs ποΈ | |
on: | |
schedule: | |
- cron: "0 0 * * 0" | |
push: | |
branches: | |
- main | |
- dev | |
workflow_dispatch: | |
jobs: | |
compress_pngs: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref_name }} | |
- 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 "[email protected]" | |
git config --global user.name "Dashboard Icons Bot" | |
git add png/ | |
git commit -m ":compression: Compressed PNGs" || exit 0 | |
git pull --rebase origin ${{ github.ref_name }} | |
git push origin HEAD:${{ github.ref_name }} |