mirror of
				https://github.com/actions/cache.git
				synced 2025-11-04 10:14:02 +00:00 
			
		
		
		
	Changed input value
This commit is contained in:
		
							parent
							
								
									c451e92c29
								
							
						
					
					
						commit
						78b088d460
					
				@ -17,7 +17,7 @@ inputs:
 | 
			
		||||
  strict-restore:
 | 
			
		||||
    description: 'Fail the workflow if the cache is not found for the given key.'
 | 
			
		||||
    required: false
 | 
			
		||||
    default: "false"
 | 
			
		||||
    default: "no"
 | 
			
		||||
  save-cache-on-any-failure:
 | 
			
		||||
    description: 'Save cache despite of any failure in the build steps'
 | 
			
		||||
    required: false
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							@ -48998,7 +48998,7 @@ function run() {
 | 
			
		||||
                core.info(`Input Variable ${constants_1.Variables.SaveCacheOnAnyFailure} is set to yes, the cache will be saved despite of any failure in the build.`);
 | 
			
		||||
            }
 | 
			
		||||
            if (!cacheKey) {
 | 
			
		||||
                if (core.getInput(constants_1.Inputs.StrictRestore) == "true") {
 | 
			
		||||
                if (core.getInput(constants_1.Inputs.StrictRestore) == "yes") {
 | 
			
		||||
                    throw new Error(`Cache with the given input key ${primaryKey} is not found, hence exiting the workflow as the strict-restore requirement is not met.`);
 | 
			
		||||
                }
 | 
			
		||||
                core.info(`Cache not found for input keys: ${[
 | 
			
		||||
@ -49011,7 +49011,7 @@ function run() {
 | 
			
		||||
            utils.setCacheState(cacheKey);
 | 
			
		||||
            const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey);
 | 
			
		||||
            utils.setCacheHitOutput(isExactKeyMatch);
 | 
			
		||||
            if (!isExactKeyMatch && core.getInput(constants_1.Inputs.StrictRestore) == "true") {
 | 
			
		||||
            if (!isExactKeyMatch && core.getInput(constants_1.Inputs.StrictRestore) == "yes") {
 | 
			
		||||
                throw new Error(`Restored cache key doesn't match the given input key ${primaryKey}, hence exiting the workflow as the strict-restore requirement is not met.`);
 | 
			
		||||
            }
 | 
			
		||||
            core.info(`Cache restored from key: ${cacheKey}`);
 | 
			
		||||
 | 
			
		||||
@ -46,7 +46,7 @@ async function run(): Promise<void> {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!cacheKey) {
 | 
			
		||||
            if (core.getInput(Inputs.StrictRestore) == "true") {
 | 
			
		||||
            if (core.getInput(Inputs.StrictRestore) == "yes") {
 | 
			
		||||
                throw new Error(
 | 
			
		||||
                    `Cache with the given input key ${primaryKey} is not found, hence exiting the workflow as the strict-restore requirement is not met.`
 | 
			
		||||
                );
 | 
			
		||||
@ -67,7 +67,7 @@ async function run(): Promise<void> {
 | 
			
		||||
        const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey);
 | 
			
		||||
        utils.setCacheHitOutput(isExactKeyMatch);
 | 
			
		||||
 | 
			
		||||
        if (!isExactKeyMatch && core.getInput(Inputs.StrictRestore) == "true") {
 | 
			
		||||
        if (!isExactKeyMatch && core.getInput(Inputs.StrictRestore) == "yes") {
 | 
			
		||||
            throw new Error(
 | 
			
		||||
                `Restored cache key doesn't match the given input key ${primaryKey}, hence exiting the workflow as the strict-restore requirement is not met.`
 | 
			
		||||
            );
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user