From c44984c334a502b0b6883deeefaef64996a1241a Mon Sep 17 00:00:00 2001 From: Constantinos Xanthopoulos Date: Wed, 17 May 2023 00:34:26 -0500 Subject: [PATCH] Add optimize_icons workflow triggered on push --- .github/workflows/optimize_icons.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/optimize_icons.yml diff --git a/.github/workflows/optimize_icons.yml b/.github/workflows/optimize_icons.yml new file mode 100644 index 000000000..37f30474a --- /dev/null +++ b/.github/workflows/optimize_icons.yml @@ -0,0 +1,23 @@ +name: Optimize icons +on: + push: + branches: + - develop + +jobs: + optimize: + runs-on: ubuntu-latest + name: Optimize icons with SVGO + steps: + - uses: actions/checkout@v3 + + - uses: ericcornelissen/svgo-action@v3 + id: svgo + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + svgo-config: ./.github/scripts/svgo.config.js + svgo-version: 3 + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "SVG Optimization: ${{ steps.svgo.outputs.OPTIMIZED_COUNT }}/${{ steps.svgo.outputs.SVG_COUNT }} SVGs got optimized."