2024-12-15 20:32:18 +01:00
|
|
|
# Nix Flake outputs size
|
|
|
|
|
2024-12-19 21:56:16 +01:00
|
|
|
Use `nix path-info` to query the size of flake outputs and produce a report.
|
2024-12-15 20:32:18 +01:00
|
|
|
|
2024-12-19 21:56:16 +01:00
|
|
|
This repost can be posted to a PR (as formatted markdown) and/or uploaded as a workflow artifact.
|
2024-12-15 20:32:18 +01:00
|
|
|
|
2024-12-19 21:56:16 +01:00
|
|
|
Requires `nix`, `jq`, `curl`, `sed`, `gunzip`, `tar` and `coreutils` to be in the runner's path.
|
2024-12-15 20:32:18 +01:00
|
|
|
|
2024-12-19 21:56:16 +01:00
|
|
|
## Example
|
2024-12-15 20:32:18 +01:00
|
|
|
|
|
|
|
```yaml
|
|
|
|
- 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'
|
2024-12-19 21:56:16 +01:00
|
|
|
# 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
|
2024-12-15 20:32:18 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
For more details see the [action.yaml](./action.yml) file.
|