Skip to content

Commit 3ad79c7

Browse files
committed
Fix CI access issues
1 parent 9aca072 commit 3ad79c7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,20 @@ jobs:
3333
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
3434
steps:
3535
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
36-
- name: Set up JDK
36+
- name: Set up JDK (for PRs)
37+
if: ${{ github.event_name == 'pull_request' }}
3738
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
3839
with:
3940
distribution: 'temurin'
4041
java-version: ${{ matrix.java_version }}
4142
cache: 'maven'
42-
- name: Set up Maven deployment credentials
43+
- name: Set up JDK with deployment credentials (for pushes)
4344
if: ${{ github.event_name != 'pull_request' }}
4445
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
4546
with:
4647
distribution: 'temurin'
4748
java-version: ${{ matrix.java_version }}
49+
cache: 'maven'
4850
server-id: central-snapshots
4951
server-username: CI_DEPLOY_USERNAME
5052
server-password: CI_DEPLOY_PASSWORD

0 commit comments

Comments
 (0)