Skip to content

Commit c641a1e

Browse files
authored
Replace explicit codecov token with tokenless-OIDC authentication (#1568)
See hazelcast/hazelcast-csharp-client#1031
1 parent 6080b51 commit c641a1e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/coverage_runner.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
- node-versions
3939
if: github.event_name == 'push' || needs.check_for_membership.outputs.check-result == 'true' || github.event_name == 'workflow_dispatch'
4040
runs-on: ${{ matrix.os }}
41+
permissions:
42+
id-token: write
4143
strategy:
4244
matrix:
4345
os: [ ubuntu-latest, windows-latest ]
@@ -99,7 +101,7 @@ jobs:
99101
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request_target' }}
100102
uses: codecov/codecov-action@v5
101103
with:
102-
token: ${{ secrets.CODECOV_TOKEN }}
104+
use_oidc: true
103105
files: coverage/lcov.info
104106
override_pr: ${{ github.event.pull_request.number }}
105107
fail_ci_if_error: true
@@ -108,15 +110,15 @@ jobs:
108110
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'push' }}
109111
uses: codecov/codecov-action@v5
110112
with:
111-
token: ${{ secrets.CODECOV_TOKEN }}
113+
use_oidc: true
112114
files: coverage/lcov.info
113115
fail_ci_if_error: true
114116

115117
- name: Publish result to Codecov for PR coming from community
116118
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'workflow_dispatch' }}
117119
uses: codecov/codecov-action@v5
118120
with:
119-
token: ${{ secrets.CODECOV_TOKEN }}
121+
use_oidc: true
120122
files: coverage/lcov.info
121123
override_pr: ${{ github.event.inputs.pr_number }}
122124
fail_ci_if_error: true

0 commit comments

Comments
 (0)