Cache miss for restore-keys: `setup-java-...`
It is my understanding, that actions/setup-java uses the same caching mechanism as actions/cache. However I fail to restore my ~/.m2/repository from cache created by setup-java.
Workflow 1
My first workflow run uses the following config to cache my ~/.m2/repository:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'
Workflow 2
But a consecutive run of a workflow (on the same repo) leads to a cache miss with the following config:
- name: Cache Maven Repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: dependency-check-${{ hashFiles('**/pom.xml') }}
restore-keys: |
setup-java-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
setup-java-${{ runner.os }}-maven-
Cache not found for input keys: dependency-check-c4ff49b329ba24e6b9da26450d2b793e3d91853c334abd09f9ba075ef65fceff, setup-java-Linux-maven-c4ff49b329ba24e6b9da26450d2b793e3d91853c334abd09f9ba075ef65fceff, setup-java-Linux-maven-.
This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.
just retested this and the issue persists