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:
parent
cb953f9e88
commit
e3d39b98e3
.github/workflows
8
.github/workflows/png-compression.yml
vendored
8
.github/workflows/png-compression.yml
vendored
@ -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
|
||||
|
9
.github/workflows/svg-compression.yml
vendored
9
.github/workflows/svg-compression.yml
vendored
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user