CI: use namespace.io (#31064)
	
		
	
				
					
				
			* namespace
* mkdir
* fix
* restore only
* restore
* v3
* disable provenance
old-commit-hash: 35ed8a0886
			
			
				pull/32199/head
			
			
		
							parent
							
								
									e3cb318151
								
							
						
					
					
						commit
						11b807cd32
					
				
				 7 changed files with 50 additions and 45 deletions
			
			
		@ -0,0 +1,34 @@ | 
				
			||||
name: 'automatically cache based on current runner' | 
				
			||||
 | 
				
			||||
inputs: | 
				
			||||
  path: | 
				
			||||
    description: 'path to cache' | 
				
			||||
    required: true | 
				
			||||
  key: | 
				
			||||
    description: 'key' | 
				
			||||
    required: true | 
				
			||||
  restore-keys: | 
				
			||||
    description: 'restore-keys' | 
				
			||||
    required: true | 
				
			||||
 | 
				
			||||
runs: | 
				
			||||
  using: "composite" | 
				
			||||
  steps: | 
				
			||||
    - name: setup namespace cache | 
				
			||||
      if: ${{ contains(runner.name, 'nsc') }}  | 
				
			||||
      uses: namespacelabs/nscloud-cache-action@v1 | 
				
			||||
      with: | 
				
			||||
        path: ${{ inputs.path }} | 
				
			||||
 | 
				
			||||
    - name: setup github cache | 
				
			||||
      if: ${{ !contains(runner.name, 'nsc') }} | 
				
			||||
      uses: actions/cache/restore@v3 | 
				
			||||
      with: | 
				
			||||
        path: ${{ inputs.path }} | 
				
			||||
        key: ${{ inputs.key }} | 
				
			||||
        restore-keys: ${{ inputs.restore-keys }} | 
				
			||||
 | 
				
			||||
    # make the directory manually in case we didn't get a hit, so it doesn't fail on future steps | 
				
			||||
    - id: scons-cache-setup | 
				
			||||
      shell: bash | 
				
			||||
      run: mkdir -p ${{ inputs.path }} | 
				
			||||
					Loading…
					
					
				
		Reference in new issue