Comment the size of nix flake output derivations on a PR
Find a file
Jalil David Salamé Messina ea9ec51d18
fix(compare): logic was wrong
We did $old - $new instead of $new - $old so positive changes where good
and negative where bad T-T
2024-12-19 23:37:38 +01:00
action.yml fix(action): typo 2024-12-19 23:07:46 +01:00
comment_on_pr.sh fix(sh): ${VAR:-val} and ${VAR-val} are different 2024-12-19 23:15:22 +01:00
compare.jq fix(compare): logic was wrong 2024-12-19 23:37:38 +01:00
create-report.sh fix(sh): ${VAR:-val} and ${VAR-val} are different 2024-12-19 23:15:22 +01:00
README.md refactor!(action): detect when in private branches 2024-12-19 22:43:51 +01:00
retrieve-old-report.sh fix(sh): ${VAR:-val} and ${VAR-val} are different 2024-12-19 23:15:22 +01:00
utils.sh refactor!(action): detect when in private branches 2024-12-19 22:43:51 +01:00

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.