Skip to content

Add an option to specify retention period for artifacts#126

Merged
yacaovsnc merged 2 commits intoactions:mainfrom
yacaovsnc:main
Sep 18, 2020
Merged

Add an option to specify retention period for artifacts#126
yacaovsnc merged 2 commits intoactions:mainfrom
yacaovsnc:main

Conversation

@yacaovsnc
Copy link
Copy Markdown
Contributor

@yacaovsnc yacaovsnc commented Sep 18, 2020

#49
#34

Add an option to specify a shorter retention for each artifact:

      - uses: actions/upload-artifact
        with:
          name: my-artifact
          path: ./my_path
          retention-days: 30

If the new retention-days option is omitted or if the input is 0, the artifact will have a default retention of 90 days unless the value is overridden on the repository settings page (coming later). This yaml input cannot be greater than the value specified on the setting page.

Negative values are not allowed, so the artifact will live for 1 day at least.

Copy link
Copy Markdown
Contributor

@konradpabjan konradpabjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! 💪 Just a few questions

Comment thread src/input-helper.ts
Comment thread action.yml
@sarink
Copy link
Copy Markdown

sarink commented Apr 1, 2021

How do you do this with the node API? import * as artifact from '@actions/artifact';

tdfacer pushed a commit to ifit/upload-artifact that referenced this pull request Oct 7, 2025
Add an option to specify retention period for artifacts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants