Skip to content

Commit 1c1ed94

Browse files
MajorTalclaude
andcommitted
ci(publish): unset GH-Actions OIDC env on test step
`id-token: write` causes GitHub Actions to inject ACTIONS_ID_TOKEN_REQUEST_URL / _TOKEN. The CLI's `deploy apply` detects those vars as "running in CI" and tries to exchange them for a Run402 session via `githubActionsCredentials()`, which calls a real endpoint not handled by the e2e mockFetch. Unset on the test step only so the publish steps below can still mint the OIDC token for npm Trusted Publisher. (The existing .github/workflows/test.yml doesn't have id-token: write, which is why this never surfaced there.) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5baafcc commit 1c1ed94

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ jobs:
121121
run: npm run build
122122

123123
- name: Run full test suite
124+
# Workflow has `id-token: write`, so GitHub injects
125+
# ACTIONS_ID_TOKEN_REQUEST_URL / _TOKEN. The CLI's `deploy apply`
126+
# detects those vars as "running in GitHub Actions CI" and takes
127+
# the OIDC-federation code path — which calls a real token-exchange
128+
# endpoint not handled by the e2e mockFetch. Unset them on the test
129+
# step ONLY; the publish steps below still need them to mint the
130+
# OIDC token for the npm Trusted Publisher exchange.
131+
env:
132+
ACTIONS_ID_TOKEN_REQUEST_URL: ""
133+
ACTIONS_ID_TOKEN_REQUEST_TOKEN: ""
124134
run: npm test
125135

126136
- name: Bump version (lockstep)

0 commit comments

Comments
 (0)