Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Fix size-limit check #6875

Merged
merged 2 commits into from
Jan 19, 2023
Merged
Changes from all commits
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
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ jobs:
any_code:
- '!**/*.md'

- name: Get PR labels
id: pr-labels
uses: mydea/pr-labels-action@update-core

outputs:
commit_label: '${{ env.COMMIT_SHA }}: ${{ env.COMMIT_MESSAGE }}'
changed_nextjs: ${{ steps.changed.outputs.nextjs }}
Expand All @@ -133,7 +137,7 @@ jobs:
is_master: ${{ github.ref == 'refs/heads/master' }}
is_release: ${{ startsWith(github.ref, 'refs/heads/release/') }}
force_skip_cache:
${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci-skip-cache') }}
${{ github.event_name == 'pull_request' && contains(steps.pr-labels.outputs.labels, ' ci-skip-cache ') }}

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