Skip to content

Commit 459c986

Browse files
committed
ci: grant id-token permission for Codecov OIDC
The conditional use_oidc input made the action request an OIDC token, but id-token is never part of the default GITHUB_TOKEN scope, so the exchange failed with 'Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable' and took the whole PHPUnit job down with it (fail_ci_if_error does not cover an unhandled error inside the action). Request id-token: write explicitly, plus contents: read since naming a job-level permissions block drops the rest.
1 parent 00eed4b commit 459c986

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/continuous-integration.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ jobs:
4949
runs-on: 'ubuntu-24.04'
5050
name: 'PHPUnit (PHP ${{ matrix.php }}, ES ${{ matrix.elasticsearch }})'
5151
timeout-minutes: 10
52+
permissions:
53+
contents: read
54+
# Required for the Codecov OIDC token exchange below. id-token is never
55+
# granted by default, so it has to be requested explicitly.
56+
id-token: write
5257
strategy:
5358
matrix:
5459
php:

0 commit comments

Comments
 (0)