Update workflows and super-linter (#674) #124
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
--- | |
# 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@v4 | |
- name: Optimize SVGs | |
uses: ericcornelissen/svgo-action@v3 | |
id: svgo | |
with: | |
repo-token: ${{secrets.GITHUB_TOKEN}} | |
svgo-config: .github/workflows/svgo.config.js | |
- name: Commit optimizations | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
if: ${{steps.svgo.outputs.DID_OPTIMIZE}} | |
with: | |
commit_message: Optimize ${{steps.svgo.outputs.OPTIMIZED_COUNT}} SVG(s) # yamllint disable-line rule:line-length |