mirror of
				https://github.com/gradle/gradle-build-action.git
				synced 2025-11-04 09:58:56 +08:00 
			
		
		
		
	Remove commas from workflow name
Commas are explicitly disallowed in cache keys, so remove any from workflow name when generating cache key.
This commit is contained in:
		@@ -109,7 +109,12 @@ function getCacheKeyEnvironment(): string {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getCacheKeyJob(): string {
 | 
			
		||||
    return process.env[CACHE_KEY_JOB_VAR] || `${github.context.workflow}-${github.context.job}`
 | 
			
		||||
    return process.env[CACHE_KEY_JOB_VAR] || getCacheKeyForJob(github.context.workflow, github.context.job)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getCacheKeyForJob(workflowName: string, jobId: string): string {
 | 
			
		||||
    const sanitizedWorkflow = workflowName.replace(/,/g, '').toLowerCase()
 | 
			
		||||
    return `${sanitizedWorkflow}-${jobId}`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getCacheKeyJobInstance(): string {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user