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

should support to keep some number of recently published of artifacts #26

Closed
hoatle opened this issue Apr 27, 2020 · 3 comments
Closed

Comments

@hoatle
Copy link

hoatle commented Apr 27, 2020

thank for your helpful action, can you add support for keeping a configurable number of recently published artifacts?

For example:

    steps:
    - name: Remove old artifacts
      uses: c-hive/gha-remove-artifacts@v1
      with:
        age: '1 month'
        keep-recent: 7 # keep the number of recently published artifacts 
        skip-tags: true

so that even if those 7 recently published artifacts are older than 1 month, the action will not delete them.

@hoatle hoatle changed the title should support to keep some recent number of artifacts should support to keep some number of recently published of artifacts Apr 27, 2020
@thisismydesign
Copy link
Member

Thanks for the feedback. Let's name the config skip-recent, otherwise one might understand them as competing options (i.e. if you have 10 artifacts within 1 month with your example config it's not clear to me if it should keep 7 or 10).

@gomorizsolt feel free to take a crack at this.

@gomorizsolt
Copy link
Collaborator

gomorizsolt commented May 8, 2020

Added this option in https://github.com/c-hive/gha-remove-artifacts/releases/tag/v1.2.0 (you should continue using the v1 tag, it's updated as well).

@thisismydesign
Copy link
Member

Released in v1.2.0, implemented in #27

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

No branches or pull requests

3 participants