ericcornelissen/svgo-action

Use specific (pinned) SVGO version

Closed this issue · 3 comments

Feature Request

  • On: any

Description

Following the research of #437, add the ability to use a specific SVGO version. This allows users to use a specific SVGO version with the latest features and bugfixes of this Action. On top of that it removes the need to update this Action every time there's a new SVGO release.

Example

Say I want to use a specific SVGO version, rather than having to downgrade this Action I like in the workflow below, want to use the latest version of this Action.

 jobs:
   svgs:
     name: SVGs
     runs-on: ubuntu-latest
     steps:
     - name: Checkout repository
       uses: actions/checkout@v2
     - name: Optimize SVGs
       uses: ericcornelissen/svgo-action@v2.0.5

Proposal

Add support to the svgo-version input to accept a specific version number. If this input is set to a specific version it should try to install that version. If the installation fails the Action should fail. If not, the Action should use the specific version.

Version ranges (e.g. ^2.1.0) are not necessarily in the scope of this issue, but may be supported if it requires little or no additional work.

For anyone looking for this feature, you can follow this example workflow until this issue is implemented.

I'm putting this on hold for now due to potential concerns when it comes to installing SVGO dynamically with every action run without any checks in place to ensure the SVGO version being installed is "valid" (e.g. there's no checksum to check the downloaded SVGO is the real SVGO). This seems to me a non-trivial problem to solve and I do not intend on trying to solve it if there's no demand for this feature.

If you're interested in this feature and the existing solution for using any SVGO version does not work for you, please feel free to leave a comment including why no existing alternative is sufficient for you.

Closing this issue for now as out of scope.

Again, if you're interested in this feature and the existing solution for using any SVGO version does not work for you, please feel free to leave a comment including why no existing alternative is sufficient for you.