Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

Less is more - artifact size

Actions
Be aware of the increase percentage of your artifact
v0.0.4
Star (1)

Tags

 (1)

CI License: MIT

less-is-more v0.0.4

This workflow will simply fail if the current artifact size has increased more than what is allowed when compared to the latest released artifact. It could be very useful to early identify unwanted size increases, especially on workflows that run for pull requests.

Required input arguments

  • released_artifact_name: The filename of the released artifact (or a unique part of it).
  • artifact_path: The path of the current artifact that has been built.
  • max_increase_percentage: The maximum increase percentage allowed.

Optional input arguments

  • github_token: The token to authenticate Octokit (increases your API rate limit).

Usage

Example: I want this workflow to fail if the artifact size that I'm building at dist/my-artifact.zip has increased more than 10% when compared to my-released-artifact, which is located on GitHub's releases page.

Note: If your released artifact contains variable parts, such as version, you can omit it. So my-released-artifact_v1.0.0.zip can be simply my-released-artifact, or even my-released-artifact_*.zip.

# Build the artifact before using this workflow.

- uses: caponetto/[email protected]
  with:
    released_artifact_name: my-released-artifact
    artifact_path: dist/my-artifact.zip
    max_increase_percentage: 10
    github_token: ${{ secrets.MY_TOKEN }}

Contribute

All contributions are welcome, so don't hesitate to submit a pull request. ;-)

License

This code is released under MIT License.

Check LICENSE file for more information.

Less is more - artifact size is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Be aware of the increase percentage of your artifact
v0.0.4

Tags

 (1)

Less is more - artifact size is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.