Replace archived SVGO action with direct svgo CLI#922
Merged
Conversation
The ericcornelissen/svgo-action is unmaintained (archived 2024-04-30). Keep the same behavior: on push to master, optimize the SVGs changed in the push using the existing svgo.config.js and auto-commit the results with the same 'Optimize N SVG(s)' message. Closes #722
129dd02 to
82f5037
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #722 —
ericcornelissen/svgo-actionwas archived on 2024-04-30.The workflow now checks out the repo, computes the SVGs changed in the push (falling back to all tracked SVGs when the before-commit is unavailable), runs
npx svgo@3with the existing.github/workflows/svgo.config.js, and commits the results back via the samegit-auto-commit-actionwith the identicalOptimize N SVG(s)message. Trigger, permissions, and outcome are unchanged.Validated locally: the existing config is svgo-v3 compatible (preset-default + removeDimensions + sortAttrs), optimization runs in-place on multiple files and is idempotent on already-optimized repo icons; YAML passes actionlint.