mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-09-08 23:02:21 +08: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:
@@ -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')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user