Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2fc32c1

Browse files
Add docs to readme for the comment-key option
1 parent4f889fa commit2fc32c1

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

‎README.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,32 @@ By default, files are compared after gzip compression, but it's possible to use
179179
```yaml
180180
compression: "none"
181181
```
182+
183+
### Checking multiple bundles
184+
185+
The action reuses the same comment each time it runs on a PR. In order to run the action multiple times against separate bundles for a single PR, you must provide a `comment-key` option, which the action will use to determine which comment to add or update for the run. The example below demonstrates this for separate "modern" and "legacy" bundles:
186+
187+
```yaml
188+
name: Compressed Size
189+
on: [pull_request]
190+
jobs:
191+
modern-bundle-size-check:
192+
runs-on: ubuntu-latest
193+
steps:
194+
- uses: actions/checkout@v2
195+
- uses: preactjs/compressed-size-action@v2
196+
with:
197+
build-script: "build:modern"
198+
comment-key: modern
199+
200+
legacy-bundle-size-check:
201+
runs-on: ubuntu-latest
202+
steps:
203+
- uses: actions/checkout@v2
204+
- uses: preactjs/compressed-size-action@v2
205+
with:
206+
build-script: "build:legacy"
207+
comment-key: legacy
208+
```
209+
210+
If you do not provide this key, the action will attempt to use (and therefore replace) the same comment for both bundles, hiding the output for whichever run finished last.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp