mirror of
				https://github.com/actions/upload-artifact.git
				synced 2025-11-03 23:53:43 +00:00 
			
		
		
		
	Adding example of retention-days option.
This commit is contained in:
		
							parent
							
								
									27bce4eee7
								
							
						
					
					
						commit
						253d2f177a
					
				
							
								
								
									
										20
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								README.md
									
									
									
									
									
								
							@ -234,6 +234,26 @@ If file permissions and case sensitivity are required, you can `tar` all of your
 | 
				
			|||||||
      path: my_files.tar    
 | 
					      path: my_files.tar    
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Retention Period
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Artifacts are retained for 90 days by default. You can specify a shorter retention period:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					  - name: 'Create a file'
 | 
				
			||||||
 | 
					    run: echo "I won't live long" > my_file.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  - name: 'Upload Artifact'
 | 
				
			||||||
 | 
					    uses: actions/upload-artifact@v2
 | 
				
			||||||
 | 
					    with:
 | 
				
			||||||
 | 
					      name: my-artifact
 | 
				
			||||||
 | 
					      path: my_file.txt
 | 
				
			||||||
 | 
					      retention-days: 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The retention period must be between 1 and 90 inclusive.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Additional Documentation
 | 
					## Additional Documentation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
See [persisting workflow data using artifacts](https://help.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts) for additional examples and tips.
 | 
					See [persisting workflow data using artifacts](https://help.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts) for additional examples and tips.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user