Skip to content

Commit e4a7ffa

Browse files
authored
Update README with more retention documentation
1 parent 726a6dc commit e4a7ffa

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,25 @@ Environment variables along with context expressions can also be used for input.
199199
path: ${{ github.workspace }}/artifact/**/*
200200
```
201201

202+
### Retention Period
203+
204+
Artifacts are retained for 90 days by default. You can specify a shorter retention period using the `retention-days` input:
205+
206+
```yaml
207+
- name: 'Create a file'
208+
run: echo "I won't live long" > my_file.txt
209+
210+
- name: 'Upload Artifact'
211+
uses: actions/upload-artifact@v2
212+
with:
213+
name: my-artifact
214+
path: my_file.txt
215+
retention-days: 5
216+
217+
```
218+
219+
The retention period must be between 1 and 90 inclusive. For more information see [artifact and log retention policies](https://docs.github.com/en/free-pro-team@latest/actions/reference/usage-limits-billing-and-administration#artifact-and-log-retention-policy).
220+
202221
## Where does the upload go?
203222
In the top right corner of a workflow run, once the run is over, if you used this action, there will be an `Artifacts` dropdown which you can download items from. Here's a screenshot of what it looks like<br/>
204223
<img src="https://user-images.githubusercontent.com/16109154/72556687-20235a80-386d-11ea-9e2a-b534faa77083.png" width="375" height="140">
@@ -234,25 +253,6 @@ If file permissions and case sensitivity are required, you can `tar` all of your
234253
path: my_files.tar
235254
```
236255

237-
### Retention Period
238-
239-
Artifacts are retained for 90 days by default. You can specify a shorter retention period:
240-
241-
```yaml
242-
- name: 'Create a file'
243-
run: echo "I won't live long" > my_file.txt
244-
245-
- name: 'Upload Artifact'
246-
uses: actions/upload-artifact@v2
247-
with:
248-
name: my-artifact
249-
path: my_file.txt
250-
retention-days: 5
251-
252-
```
253-
254-
The retention period must be between 1 and 90 inclusive.
255-
256256

257257
## Additional Documentation
258258

0 commit comments

Comments
 (0)