-
-
Notifications
You must be signed in to change notification settings - Fork 332
29 lines (26 loc) · 786 Bytes
/
svgo.yml
File metadata and controls
29 lines (26 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
# GitHub Action uses SVGO to Minify and removeDimensions of SVG files
name: Optimize SVG Files
on:
push:
branches: [master]
permissions:
contents: write
jobs:
svgs:
name: SVGs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Optimize SVGs
uses: ericcornelissen/svgo-action@v4
id: svgo
with:
repo-token: ${{secrets.GITHUB_TOKEN}}
svgo-config: .github/workflows/svgo.config.js
- name: Commit optimizations
uses: stefanzweifel/git-auto-commit-action@v6
if: ${{steps.svgo.outputs.DID_OPTIMIZE}}
with:
commit_message: Optimize ${{steps.svgo.outputs.OPTIMIZED_COUNT}} SVG(s) # yamllint disable-line rule:line-length