Skip to content

Commit 5edeb47

Browse files
authored
ci: use OIDC for codecov-action (#1856)
Replace token-based authentication with OIDC (OpenID Connect) for codecov-action. This is more secure and eliminates the need to manage upload tokens. Changes: - Add use_oidc: true to codecov-action configuration - Add id-token: write permission at workflow level - Remove token parameter from codecov-action (ignored when using OIDC) This improves security and follows codecov-action best practices. Generated by the task: njzjz-bot/njzjz-bot#25.
1 parent 793f736 commit 5edeb47

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Python package
22

33
on:
4-
- push
5-
- pull_request
4+
- push
5+
- pull_request
66

77
jobs:
88
build:
@@ -25,6 +25,8 @@ jobs:
2525
- uses: codecov/codecov-action@v5
2626
env:
2727
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
28+
with:
29+
use_oidc: true
2830
pass:
2931
needs: [build]
3032
runs-on: ubuntu-latest
@@ -34,3 +36,5 @@ jobs:
3436
uses: re-actors/alls-green@release/v1
3537
with:
3638
jobs: ${{ toJSON(needs) }}
39+
permissions:
40+
id-token: write

0 commit comments

Comments
 (0)