Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A GitHub action that reports changes in compressed file sizes on your PRs.

<img width="600" src="https://user-images.githubusercontent.com/105127/73027489-8413c900-3e01-11ea-8630-09172b247f82.png">

### Usage:
### Usage [Internal PRs in same repo]:
Comment thread
rschristian marked this conversation as resolved.
Outdated

Add a workflow (`.github/workflows/main.yml`):

Expand All @@ -29,6 +29,13 @@ jobs:
- uses: preactjs/compressed-size-action@v2
```

### Usage [External PRs from forks]:

There is no secure way to run this action as a single step when comparing an external PR from a fork, as it would need `pull_request_target`
permission to post the comment. See #54 for more info, there is a two step workaround possible whereby a json artifact is generated in a
first step (pull_request), and posted as a comment in the forked pr in the second step (pull_request_target).
Comment thread
rschristian marked this conversation as resolved.
Outdated


### Customizing the Installation

By default, `compressed-size-action` will install dependencies according to which lockfiles are present, if any. However, if you need to run a different installation command, you can pass a custom script to do so. For example, to use `npm ci` with the `--workspace` option:
Expand Down