From 9ddf73e50f3469b9bc728a143d870c77c3c8cd4e Mon Sep 17 00:00:00 2001 From: Leo McArdle Date: Tue, 1 Oct 2024 15:52:13 +0100 Subject: [PATCH] fix(build): don't run bundlesize action on PRs from forks (#11887) --- .github/workflows/pr-bundlesize-compare.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr-bundlesize-compare.yml b/.github/workflows/pr-bundlesize-compare.yml index cd4b4fde2872..2aec9b0ae0ee 100644 --- a/.github/workflows/pr-bundlesize-compare.yml +++ b/.github/workflows/pr-bundlesize-compare.yml @@ -6,6 +6,7 @@ on: jobs: # Build current and upload stats.json build-head: + if: github.event.pull_request.head.repo.full_name == github.repository name: "Build head" permissions: contents: read @@ -46,6 +47,7 @@ jobs: # Build base for comparison and upload stats.json build-base: + if: github.event.pull_request.head.repo.full_name == github.repository name: "Build base" permissions: contents: read @@ -86,6 +88,7 @@ jobs: # run the action against the stats.json files compare: + if: github.event.pull_request.head.repo.full_name == github.repository name: "Compare base & head bundle sizes" runs-on: ubuntu-latest needs: [build-base, build-head]