Comment the size of nix flake output derivations on a PR
Jalil David Salamé Messina
983bec568c
This should help them out to reduce the size. Also rectify misunderstanding about NAR Size. |
||
---|---|---|
action.yml | ||
comment_on_pr.sh | ||
compare.jq | ||
create-report.sh | ||
README.md | ||
retrieve-old-report.sh | ||
utils.sh |
Nix Flake outputs size
Use nix path-info
to query the size of flake outputs and produce a report.
This repost can be posted to a PR (as formatted markdown) and/or uploaded as a workflow artifact.
Requires nix
, jq
, curl
, sed
, gunzip
, tar
and coreutils
to be in the runner's path.
Example
- name: Generate size report
uses: https://git.salame.cl/jalil/nix-flake-outputs-size@main
with: # Default values
comment-on-pr: 'true'
generate-artifact: 'false'
artifact-name: 'size-report.md'
# If you want to enable comparisons set this to true
do-comparison: 'false'
job-name: '' # required if do-comparison is true
# This is the branch that will be compared against
base-branch: ${{ github.base_ref }} # or default branch if missing
For more details see the action.yaml file.