1
0
mirror of https://github.com/walkxcode/dashboard-icons.git synced 2025-03-13 16:30:11 +01:00

Revert back to scheduled compression

This commit is contained in:
walkxcode 2023-04-16 23:59:35 +02:00
parent cb953f9e88
commit e3d39b98e3
2 changed files with 8 additions and 9 deletions

@ -1,9 +1,8 @@
name: 🗜️ PNG Compression
on:
push:
paths:
- '**/*.png'
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
@ -20,10 +19,11 @@ jobs:
- name: Compress PNGs
run: |
echo "🖼️ Compressing PNGs..."
git diff --name-only --diff-filter=ACMRT ${{ github.sha }} | grep '\.png$' | xargs -P 4 -I{} sh -c 'echo "Compressing {}"; zopflipng -y {} {}' || true
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

@ -1,9 +1,8 @@
name: 🗜️ SVG Compression
on:
push:
paths:
- '**/*.svg'
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
@ -12,7 +11,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo apt-get update
@ -21,10 +19,11 @@ jobs:
- name: Compress SVGs
run: |
echo "🎨 Compressing SVGs..."
git diff --name-only --diff-filter=d "${{ github.event.before }}..${{ github.event.after }}" | grep "\.svg$" | xargs -P 4 -I{} sh -c 'echo "Compressing {}"; svgo --quiet --multipass {}' || true
find svg/ -iname "*.svg" -print0 | xargs -0 -P 4 -I{} sh -c 'echo "Compressing {}"; svgo --quiet --multipass {}' || 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