mirror of
				https://git.mirrors.martin98.com/https://github.com/actions/cache
				synced 2025-10-31 16:11:05 +08:00 
			
		
		
		
	Add cargo example for Rust project (#8)
* Add cargo example * Add hash of Cargo.lock to keys of caches * Move Rust example to examples.md
This commit is contained in:
		
							parent
							
								
									8c4c641fa0
								
							
						
					
					
						commit
						57f889e86e
					
				
							
								
								
									
										21
									
								
								examples.md
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								examples.md
									
									
									
									
									
								
							| @ -10,6 +10,7 @@ | |||||||
| - [Ruby - Gem](#ruby---gem) | - [Ruby - Gem](#ruby---gem) | ||||||
| - [Go - Modules](#go---modules) | - [Go - Modules](#go---modules) | ||||||
| - [Elixir - Mix](#elixir---mix) | - [Elixir - Mix](#elixir---mix) | ||||||
|  | - [Rust - Cargo](#rust---cargo) | ||||||
| 
 | 
 | ||||||
| ## Node - npm | ## Node - npm | ||||||
| 
 | 
 | ||||||
| @ -119,3 +120,23 @@ uses: actions/cache@preview | |||||||
|     restore-keys: | |     restore-keys: | | ||||||
|       ${{ runner.os }}-mix- |       ${{ runner.os }}-mix- | ||||||
| ``` | ``` | ||||||
|  | 
 | ||||||
|  | ## Rust - Cargo | ||||||
|  | 
 | ||||||
|  | ``` | ||||||
|  | - name: Cache cargo registry | ||||||
|  |   uses: actions/cache@preview | ||||||
|  |   with: | ||||||
|  |     path: ~/.cargo/registry | ||||||
|  |     key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||||||
|  | - name: Cache cargo index | ||||||
|  |   uses: actions/cache@preview | ||||||
|  |   with: | ||||||
|  |     path: ~/.cargo/git | ||||||
|  |     key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||||||
|  | - name: Cache cargo build | ||||||
|  |   uses: actions/cache@preview | ||||||
|  |   with: | ||||||
|  |     path: target | ||||||
|  |     key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | ||||||
|  | ``` | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Linda_pp
						Linda_pp