Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify shorter artifact retention time #49

Closed
lelegard opened this issue Jan 28, 2020 · 5 comments
Closed

Specify shorter artifact retention time #49

lelegard opened this issue Jan 28, 2020 · 5 comments
Labels
enhancement New feature or request retention Artifact retention

Comments

@lelegard
Copy link

Hi,

This suggestion has been discussed here in the GitHub community forum. It can be considered as an extension of #45.

The current retention time for artifacts is 90 days. I suggest a more flexible artifact retention duration. I have setup nightly builds on my open source project. I certainly do not need those nightly builds to be retained for 90 days. Keeping the last 5 days (or so) is sufficient,

The current retention time of 90 days should be a default one and/or a maximum one. But a shorter period should be allowed, either in the settings of the repo or on an artifact basis, for instance something like this:

    - name: Upload build
      uses: actions/upload-artifact@master
      with:
        name: installer
        path: installer.exe
        retention-days: 5
@kolpav
Copy link

kolpav commented Mar 6, 2020

@lelegard Take a look at my https://github.com/kolpav/purge-artifacts-action . I already shared the link in few places but I feel it could help more people by also sharing it here judging by number of +1.

@konradpabjan konradpabjan added enhancement New feature or request retention Artifact retention labels Mar 19, 2020
@konradpabjan
Copy link
Collaborator

Thanks for the suggestion @lelegard!

I think it would be really cool to have an input that allows you to specify the retention duration. Lots of different uses cases that this could help support.

Pretty similar to the following issue (keeping both open): #34

@ahdbilal
Copy link

You can now change artifact and log retention duration either through Actions Settings tab or via YAML. You can learn more about this feature here. Feedback is welcome!

@lelegard
Copy link
Author

Thanks a lot @ahdbilal. This is exactly what I was looking for. I just added retention-days: 5 to all artifacts in my nightly build workflow. In 6 days from now, I will be able to check if the next nightly build disappears.

@lelegard
Copy link
Author

Hi @ahdbilal

After 6 days, the nightly build action now displays "The following artifacts have expired and are no longer able to be downloaded". The list of artifacts is still present but the artifact names are greyed and have no link.

We can close this one. Thanks for having implemented this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request retention Artifact retention
Projects
None yet
Development

No branches or pull requests

4 participants