From 9642474a11ae0aace3c553aef08effd4ee3caf6e Mon Sep 17 00:00:00 2001 From: Leo McArdle Date: Tue, 1 Oct 2024 10:14:54 +0000 Subject: [PATCH] fix(build): don't run bundlesize action on PRs from forks --- .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]