mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-05-01 12:38:08 +02:00
Allow entries with same Job ID to match in different workflows
Previously, the workflow name was always included when matching a cache entry for the current job. This can be overly restrictive when job definitions are shared between different workflows. The workflow name is still encoded in the cache entry key, but not in the restore key searching for entries with a matching job. Fixes #1017
This commit is contained in:
parent
270f30ba56
commit
32bab5b15a
7 changed files with 19 additions and 80 deletions
|
@ -17,10 +17,4 @@ describe('cacheUtils-utils', () => {
|
|||
expect(posixHash).toBe(windowsHash)
|
||||
})
|
||||
})
|
||||
describe('sanitizes workflow name in cache key', () => {
|
||||
it('with comma', () => {
|
||||
const cacheKey = cacheUtils.getCacheKeyForJob("Workflow, with,commas", "JOB_ID")
|
||||
expect(cacheKey).toBe('workflow withcommas-JOB_ID')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue