From 0752a0b9390c457ad803df2f96636d9b68d2cb28 Mon Sep 17 00:00:00 2001 From: tcheeric Date: Wed, 25 Nov 2026 22:45:35 +0000 Subject: [PATCH] ci: let only the JDK 21 job write the Maven cache Both matrix jobs share one setup-java cache key. The JDK 17 job only runs mvn -N validate, finished first and saved a ~0 MB cache. Every later run hit that empty cache, skipped saving, and fetched all dependencies from Maven Central, which returned HTTP 429. --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55d08ee2..f2532464 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,10 @@ jobs: with: distribution: temurin java-version: ${{ matrix.java-version }} - cache: maven + # Only the JDK 21 job resolves the full dependency tree. Both jobs share one cache key, + # so letting the near-empty JDK 17 validate job save first left every cache at ~0 MB + # and made each build download from Maven Central (HTTP 429 rate limits). + cache: ${{ matrix.java-version == '21' && 'maven' || '' }} - name: Make release script executable run: chmod +x scripts/release.sh