Skip to content

Commit 1a8d060

Browse files
author
Peter Bengtsson
authored
use pull_request for the private staging-build-and-deploy (#23783)
1 parent 361881e commit 1a8d060

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/staging-build-and-deploy-pr.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ name: Staging - Build and Deploy PR (fast and private-only)
66

77
# This whole workflow is only guaranteed to be secure in the *private
88
# repo* and because we repo-sync these files over the to the public one,
9-
# IT'S CRUCIALLY IMPORTANT THAT THIS WORKFLOW IS ONLY ENABLED IN docs-internal!
9+
# IT'S IMPORTANT THAT THIS WORKFLOW IS ONLY ENABLED IN docs-internal!
1010

1111
on:
12-
# Ideally, we'd like to use 'pull_request' because we can more easily
13-
# test changes to this workflow without relying on merges to 'main'.
14-
# But this is guaranteed to be safer and won't have the problem of
15-
# necessary secrets not being available.
16-
# Perhaps some day when we're confident this workflow will always
17-
# work in a regular PR, we can switch to that.
18-
pull_request_target:
12+
# The advantage of 'pull_request' over 'pull_request_target' is that we
13+
# can make changes to this file and test them in a pull request, instead
14+
# of relying on landing it in 'main' first.
15+
# From a security point of view, its arguably safer this way because
16+
# unlike 'pull_request_target', these only have secrets if the pull
17+
# request creator has permission to access secrets.
18+
pull_request:
1919

2020
permissions:
2121
actions: read

0 commit comments

Comments
 (0)