refactor!(action): detect when in private branches

This removes the need to use the private-repo-workaround input.
This commit is contained in:
Jalil David Salamé Messina 2024-12-19 21:56:16 +01:00
parent bff5365c60
commit 39f58ee538
Signed by: jalil
GPG key ID: F016B9E770737A0B
5 changed files with 125 additions and 69 deletions

View file

@ -1,12 +1,12 @@
# Nix Flake outputs size
Use `nix path-info` to query the size of flake outputs and produce a markdown report.
Use `nix path-info` to query the size of flake outputs and produce a report.
You can post this report as a comment to the PR associated with the current branch and/or export the report as a markdown artifact.
This repost can be posted to a PR (as formatted markdown) and/or uploaded as a workflow artifact.
Requires `nix`, `jq`, `curl`, `sed` and `coreutils` to be in path.
Requires `nix`, `jq`, `curl`, `sed`, `gunzip`, `tar` and `coreutils` to be in the runner's path.
## Usage
## Example
```yaml
- name: Generate size report
@ -15,6 +15,11 @@ Requires `nix`, `jq`, `curl`, `sed` and `coreutils` to be in path.
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](./action.yml) file.