Skip to content

Commit 924b5ab

Browse files
authored
[test] Only run build_and_deploy once for PRs from upstream (#80329)
1 parent 0bb13fa commit 924b5ab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/build_and_deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ env:
2828
jobs:
2929
deploy-target:
3030
runs-on: ubuntu-latest
31+
# Don't trigger this job on `pull_request` events from upstream branches.
32+
# Those would already run this job on the `push` event
33+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork }}
3134
outputs:
3235
value: ${{ steps.deploy-target.outputs.value }}
3336
steps:
@@ -693,7 +696,7 @@ jobs:
693696

694697
buildPassed:
695698
needs: ['deploy-target', 'build', 'build-wasm', 'build-native']
696-
if: always()
699+
if: ${{ always() && needs.deploy-target.outputs.value != '' }}
697700
name: thank you, build
698701
runs-on: ubuntu-latest
699702
steps:

0 commit comments

Comments
 (0)