Warning
Support for SVGO Action ended 2024-04-30. We recommend finding an alternative and to not start nor continue using this Action.
This documentation describes the behavior of the SVGO Action for every GitHub Actions event that is supported. If an event is not listed here it is not officially supported.
Please open an issue if you found a mistake or if you have suggestions for how to improve the documentation.
Important
The Action will run on any event if strict mode is not enabled. However, this is not officially supported so you may encounter unexpected behaviour.
Find out more in the GitHub Actions documentation on
pull_request
events, branch and tag filters, and path filters.
In the pull_request
context the SVGO Action will optimize all SVGs that have
been added or modified in the Pull Request. Any SVGs that are in the repository
but have not been modified in the Pull Request will not be optimized.
The Action will never modify SVGs that are already optimized or SVGs that are ignored.
The following inputs are available in the pull_request
context.
Name | Supported | Required |
---|---|---|
dry-run |
Yes | No |
ignore |
Yes | No |
repo-token |
Yes | Yes |
strict |
Yes | No |
svgo-config |
Yes | No |
svgo-version |
Yes | No |
The following outputs are available in the pull_request
context.
Name | Outputted |
---|---|
DID_OPTIMIZE |
Yes |
OPTIMIZED_COUNT |
Yes |
SVG_COUNT |
Yes |
Find out more in the GitHub Actions documentation on
push
events, branch and tag filters, and path filters.
In the push
context the SVGO Action will optimize all SVGs that have been
added or modified in the commit(s) being pushed. Any SVGs that are in the
repository but have not been modified in the commit(s) will not be optimized.
The Action will never modify SVGs that are already optimized or SVGs that are ignored.
The following inputs are available in the push
context.
Name | Supported | Required |
---|---|---|
dry-run |
Yes | No |
ignore |
Yes | No |
repo-token |
Yes | Yes |
strict |
Yes | No |
svgo-config |
Yes | No |
svgo-version |
Yes | No |
The following outputs are available in the push
context.
Name | Outputted |
---|---|
DID_OPTIMIZE |
Yes |
OPTIMIZED_COUNT |
Yes |
SVG_COUNT |
Yes |
Find out more in the GitHub Actions documentation on
schedule
events.
In the schedule
context the SVGO Action will optimize all SVGs in the
repository at the scheduled time.
The Action will never modify SVGs that are already optimized or SVGs that are ignored.
The following inputs are available in the schedule
context.
Name | Supported | Required |
---|---|---|
dry-run |
Yes | No |
ignore |
Yes | No |
repo-token |
No | No |
strict |
Yes | No |
svgo-config |
Yes | No |
svgo-version |
Yes | No |
The following outputs are available in the schedule
context.
Name | Outputted |
---|---|
DID_OPTIMIZE |
Yes |
OPTIMIZED_COUNT |
Yes |
SVG_COUNT |
Yes |
Find out more in the GitHub Actions documentation on
repository_dispatch
events andworkflow_dispatch
events.
In the repository_dispatch
and workflow_dispatch
contexts the SVGO Action
will optimize all SVGs in the repository.
The Action will never modify SVGs that are already optimized or SVGs that are ignored.
The following inputs are available in the repository_dispatch
and
workflow_dispatch
contexts.
Name | Supported | Required |
---|---|---|
dry-run |
Yes | No |
ignore |
Yes | No |
repo-token |
No | No |
strict |
Yes | No |
svgo-config |
Yes | No |
svgo-version |
Yes | No |
The following outputs are available in the repository_dispatch
and
workflow_dispatch
contexts.
Name | Outputted |
---|---|
DID_OPTIMIZE |
Yes |
OPTIMIZED_COUNT |
Yes |
SVG_COUNT |
Yes |
Content licensed under CC BY-SA 4.0; Code snippets under the MIT license.