mirror of
				https://github.com/actions/cache.git
				synced 2025-10-31 22:40:55 +00:00 
			
		
		
		
	Update README with a quick setup guide
This commit is contained in:
		
					parent
					
						
							
								4c471c3c46
							
						
					
				
			
			
				commit
				
					
						be131183c6
					
				
			
		
					 1 changed files with 18 additions and 5 deletions
				
			
		
							
								
								
									
										23
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										23
									
								
								README.md
									
										
									
									
									
								
							|  | @ -7,12 +7,25 @@ This fork of the GitHub Actions cache action adds Google Cloud Storage (GCS) as | ||||||
| - **Custom retention**: Control cache retention policies through GCS lifecycle management | - **Custom retention**: Control cache retention policies through GCS lifecycle management | ||||||
| - **Existing infrastructure**: Leverage your existing GCS infrastructure and permissions | - **Existing infrastructure**: Leverage your existing GCS infrastructure and permissions | ||||||
| 
 | 
 | ||||||
| [](https://github.com/danySam/gcs-cache/actions/workflows/workflow.yml) | ## Quick Setup Guide | ||||||
| 
 | 
 | ||||||
| >Three actions are available: | 1. **Create a GCS bucket** for your caches (if you don't already have one) | ||||||
| >* Primary `cache` action with automatic save/restore | 2. **Set up authentication**: | ||||||
| >* [Restore action](./restore/README.md) for restore-only operation |    ```yaml | ||||||
| >* [Save action](./save/README.md) for save-only operation |    - uses: google-github-actions/auth@v2 | ||||||
|  |      with: | ||||||
|  |        credentials_json: ${{ secrets.GCP_CREDENTIALS }} | ||||||
|  |    ``` | ||||||
|  | 3. **Add to your workflow**: | ||||||
|  |    ```yaml | ||||||
|  |    - uses: danySam/gcs-cache@v1 | ||||||
|  |      with: | ||||||
|  |        path: ~/.npm | ||||||
|  |        key: npm-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||||||
|  |        gcs-bucket: your-gcs-bucket-name | ||||||
|  |    ``` | ||||||
|  | 
 | ||||||
|  | That's it! Your cache will now use GCS storage with automatic fallback to GitHub's cache. | ||||||
| 
 | 
 | ||||||
| ## Documentation | ## Documentation | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue