Skip to content

Commit db8a853

Browse files
fix: use OIDC for Codecov (#167)
1 parent b85d5e2 commit db8a853

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

.github/workflows/maven.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,32 @@ name: Java CI with Maven
55

66
on:
77
push:
8-
branches: [ "master", "v2" ]
8+
branches: ["master", "v2"]
99
pull_request:
10-
branches: [ "master", "v2" ]
10+
branches: ["master", "v2"]
11+
12+
permissions:
13+
contents: read
14+
id-token: write
1115

1216
jobs:
1317
build:
14-
1518
runs-on: ubuntu-latest
1619

1720
steps:
18-
- uses: actions/checkout@v5
19-
- name: Set up JDK 21
20-
uses: actions/setup-java@v5
21-
with:
22-
java-version: '21'
23-
distribution: 'corretto'
24-
cache: maven
25-
- name: Maven version
26-
run: mvn --version
27-
- name: Build with Maven
28-
run: mvn clean package
29-
- name: Codecov
30-
uses: codecov/codecov-action@v5
31-
with:
32-
token: ${{ secrets.CODECOV_TOKEN }}
21+
- uses: actions/checkout@v5
22+
- name: Set up JDK 21
23+
uses: actions/setup-java@v5
24+
with:
25+
java-version: "21"
26+
distribution: "corretto"
27+
cache: maven
28+
- name: Maven version
29+
run: mvn --version
30+
- name: Build with Maven
31+
run: mvn clean package
32+
- name: Codecov
33+
uses: codecov/codecov-action@v5
34+
with:
35+
fail_ci_if_error: true
36+
use_oidc: true

0 commit comments

Comments
 (0)