From 726a6dcd0199f578459862705eed35cda05af50b Mon Sep 17 00:00:00 2001 From: Brian Westphal <64272026+brian-keebo@users.noreply.github.com> Date: Fri, 13 Nov 2020 12:25:13 -0500 Subject: [PATCH] Adding example of retention-days option. (#131) --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 848f5fc8..07e61db2 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,26 @@ If file permissions and case sensitivity are required, you can `tar` all of your 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 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.