Skip to content

Commit ae56638

Browse files
authored
ci: Fix size-limit check (#6875)
1 parent e7b9e64 commit ae56638

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ jobs:
120120
any_code:
121121
- '!**/*.md'
122122
123+
- name: Get PR labels
124+
id: pr-labels
125+
uses: mydea/pr-labels-action@update-core
126+
123127
outputs:
124128
commit_label: '${{ env.COMMIT_SHA }}: ${{ env.COMMIT_MESSAGE }}'
125129
changed_nextjs: ${{ steps.changed.outputs.nextjs }}
@@ -133,7 +137,7 @@ jobs:
133137
is_master: ${{ github.ref == 'refs/heads/master' }}
134138
is_release: ${{ startsWith(github.ref, 'refs/heads/release/') }}
135139
force_skip_cache:
136-
${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci-skip-cache') }}
140+
${{ github.event_name == 'pull_request' && contains(steps.pr-labels.outputs.labels, ' ci-skip-cache ') }}
137141

138142
job_install_deps:
139143
name: Install Dependencies
@@ -268,7 +272,7 @@ jobs:
268272
needs: [job_get_metadata, job_build]
269273
timeout-minutes: 15
270274
runs-on: ubuntu-20.04
271-
# Size Check will error out outside of the context of a PR
275+
# Size Check will error out outside of the context of a PR or master branch
272276
if: github.event_name == 'pull_request' || needs.job_get_metadata.outputs.is_master == 'true'
273277
steps:
274278
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
@@ -293,9 +297,7 @@ jobs:
293297
path: ${{ env.CACHED_BUILD_PATHS }}
294298
key: ${{ env.BUILD_CACHE_KEY }}
295299
- name: Check bundle sizes
296-
uses: getsentry/size-limit-action@v5
297-
# Don't run size check on release branches - at that point, we're already committed
298-
if: needs.job_get_metadata.outputs.is_release == 'false'
300+
uses: getsentry/size-limit-action@main-skip-step
299301
with:
300302
github_token: ${{ secrets.GITHUB_TOKEN }}
301303
skip_step: build

0 commit comments

Comments
 (0)