Update cache/restore/action.yaml
This commit is contained in:
		
							
								
								
									
										35
									
								
								cache/restore/action.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										35
									
								
								cache/restore/action.yaml
									
									
									
									
										vendored
									
									
								
							@@ -1,18 +1,19 @@
 | 
			
		||||
name: Restore Cache
 | 
			
		||||
desciption: Restore cached files
 | 
			
		||||
 | 
			
		||||
inputs:
 | 
			
		||||
  key:
 | 
			
		||||
    type: string
 | 
			
		||||
    required: false
 | 
			
		||||
    default: ${{github.job_id}}
 | 
			
		||||
 | 
			
		||||
runs:
 | 
			
		||||
  using: composite
 | 
			
		||||
  steps:
 | 
			
		||||
    - name: Create cache
 | 
			
		||||
      run: |
 | 
			
		||||
        [ ! -f "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ] && echo "Cache not found" && exit
 | 
			
		||||
        tar --overwrite -xzf "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"
 | 
			
		||||
        echo "Cache restored: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"  
 | 
			
		||||
name: Restore Cache
 | 
			
		||||
desciption: Restore cached files
 | 
			
		||||
 | 
			
		||||
inputs:
 | 
			
		||||
  key:
 | 
			
		||||
    type: string
 | 
			
		||||
    required: false
 | 
			
		||||
    description: Key to store cache under
 | 
			
		||||
    default: ${{github.run_id}}
 | 
			
		||||
 | 
			
		||||
runs:
 | 
			
		||||
  using: composite
 | 
			
		||||
  steps:
 | 
			
		||||
    - name: Create cache
 | 
			
		||||
      run: |
 | 
			
		||||
        [ ! -f "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz" ] && echo "Cache not found" && exit
 | 
			
		||||
        tar --overwrite -xzf "/cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"
 | 
			
		||||
        echo "Cache restored: /cache/$GITHUB_REPOSITORY/${{ inputs.key }}/archive.tar.gz"  
 | 
			
		||||
      shell: sh  
 | 
			
		||||
		Reference in New Issue
	
	Block a user