Skip to content

Commit a64f303

Browse files
committed
fix: require Azure e2e token for trusted refs
1 parent 4a32153 commit a64f303

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
env:
3232
AZURE_DEVOPS_TOKEN_OPENUPM_PIPELINE: ${{ secrets.AZURE_DEVOPS_TOKEN_OPENUPM_PIPELINE }}
3333
SOURCE_BRANCH: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
34+
AZURE_E2E_ALLOW_MISSING_TOKEN: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
3435
timeout-minutes: 10
3536
steps:
3637
- uses: actions/checkout@v5
@@ -42,6 +43,10 @@ jobs:
4243
id: azure-pat
4344
run: |
4445
if [ -z "${AZURE_DEVOPS_TOKEN_OPENUPM_PIPELINE:-}" ]; then
46+
if [ "${AZURE_E2E_ALLOW_MISSING_TOKEN:-false}" != "true" ]; then
47+
echo "AZURE_DEVOPS_TOKEN_OPENUPM_PIPELINE is required for Azure E2E in this repository."
48+
exit 1
49+
fi
4550
echo "AZURE_DEVOPS_TOKEN_OPENUPM_PIPELINE is not configured; skipping Azure E2E."
4651
echo "has_token=false" >> "$GITHUB_OUTPUT"
4752
else

0 commit comments

Comments
 (0)