Skip to content

Commit

Permalink
ci: fix bundle size job not working on external PRs (#1801)
Browse files Browse the repository at this point in the history
* ci: fix bundle size job not working on external PRs

* ci: exclude "built in x seconds" timing line from output
  • Loading branch information
dyc3 authored Aug 31, 2024
1 parent a14c4f0 commit f92b41a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
matrix:
node-version: [18.x]
ref:
- ${{ github.event.pull_request.base.ref }}
- ${{ github.event.pull_request.head.ref }}
- ${{ github.event.pull_request.base.sha }}
- ${{ github.event.pull_request.head.sha }}
fail-fast: true
steps:
- uses: actions/checkout@v4
Expand All @@ -45,7 +45,7 @@ jobs:
- run: corepack enable
- run: yarn install --immutable
- run: |
yarn workspace ott-client run build | sed -r 's/([a-zA-Z]+-)[^ .]+(\.[^ ]+)/\1hash\2/' | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | tee /tmp/bundle-size.txt
yarn workspace ott-client run build | sed -r 's/([a-zA-Z]+-)[^ .]+(\.[^ ]+)/\1hash\2/' | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | grep -v "built in" | tee /tmp/bundle-size.txt
- name: Upload bundle size
uses: actions/upload-artifact@v4
Expand All @@ -63,12 +63,12 @@ jobs:
- name: Download bundle size (base ref)
uses: actions/download-artifact@v4
with:
name: bundle-size-${{ github.event.pull_request.base.ref }}
name: bundle-size-${{ github.event.pull_request.base.sha }}
path: /tmp/bundle-size-base.txt
- name: Download bundle size (head ref)
uses: actions/download-artifact@v4
with:
name: bundle-size-${{ github.event.pull_request.head.ref }}
name: bundle-size-${{ github.event.pull_request.head.sha }}
path: /tmp/bundle-size-head.txt
- name: Compare bundle sizes
run: |
Expand Down

0 comments on commit f92b41a

Please sign in to comment.