Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Latest commit

 

History

History
192 lines (138 loc) · 6.31 KB

events.md

File metadata and controls

192 lines (138 loc) · 6.31 KB

SVGO Action Events

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.


on: pull_request

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.

Inputs

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

Outputs

The following outputs are available in the pull_request context.

Name Outputted
DID_OPTIMIZE Yes
OPTIMIZED_COUNT Yes
SVG_COUNT Yes

on: push

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.

Inputs

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

Outputs

The following outputs are available in the push context.

Name Outputted
DID_OPTIMIZE Yes
OPTIMIZED_COUNT Yes
SVG_COUNT Yes

on: schedule

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.

Inputs

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

Outputs

The following outputs are available in the schedule context.

Name Outputted
DID_OPTIMIZE Yes
OPTIMIZED_COUNT Yes
SVG_COUNT Yes

Dispatch Events

Find out more in the GitHub Actions documentation on repository_dispatch events and workflow_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.

Inputs

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

Outputs

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.