1
0
Fork 0
mirror of https://github.com/walkxcode/dashboard-icons.git synced 2024-07-20 17:17:33 +02:00
dashboard-icons/.github/workflows/svg-compression.yml
Bjorn Lammers 16fe892f8d
💚 Adds git pull before pushing
Signed-off-by: Bjorn Lammers <walkxnl@gmail.com>
2023-04-17 12:22:17 +02:00

33 lines
880 B
YAML

name: 🗜️ SVG 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 npm install -g svgo
- name: Compress SVGs
run: |
echo "🎨 Compressing SVGs..."
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
git commit -m ":clamp: Compresses SVGs" || exit 0
git pull
git push