mirror of
				https://github.com/actions/cache.git
				synced 2025-11-04 09:24:01 +00:00 
			
		
		
		
	build - adding reeval functionality
This commit is contained in:
		
							parent
							
								
									b134ca8d48
								
							
						
					
					
						commit
						88d49726bd
					
				
							
								
								
									
										12
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							@ -46783,8 +46783,16 @@ function run() {
 | 
				
			|||||||
                    return;
 | 
					                    return;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                const state = utils.getCacheState();
 | 
					                const state = utils.getCacheState();
 | 
				
			||||||
                // Inputs are re-evaluted before the post action, so we want the original key used for restore
 | 
					                let primaryKey = "";
 | 
				
			||||||
                const primaryKey = core.getState(constants_1.State.CachePrimaryKey);
 | 
					                const reeval = core.getBooleanInput(constants_1.Inputs.Reeval);
 | 
				
			||||||
 | 
					                if (!reeval) {
 | 
				
			||||||
 | 
					                    // Inputs are reevaluted before the post action, so we want the original key used for restore
 | 
				
			||||||
 | 
					                    primaryKey = core.getState(constants_1.State.CachePrimaryKey);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else {
 | 
				
			||||||
 | 
					                    // choose to reevaluate primary key
 | 
				
			||||||
 | 
					                    primaryKey = core.getInput(constants_1.Inputs.Key, { required: true });
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                if (!primaryKey) {
 | 
					                if (!primaryKey) {
 | 
				
			||||||
                    utils.logWarning(`Error retrieving key from state.`);
 | 
					                    utils.logWarning(`Error retrieving key from state.`);
 | 
				
			||||||
                    return;
 | 
					                    return;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user