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

Add keep-tags multi-line input #20

Merged
merged 3 commits into from
Mar 10, 2022
Merged

Add keep-tags multi-line input #20

merged 3 commits into from
Mar 10, 2022

Conversation

vlaurin
Copy link
Owner

@vlaurin vlaurin commented Feb 25, 2022

Resolves #9
Ability to exclude versions from pruning by exactly matching at least one tag to keep.

Resolves #9
Ability to exclude versions from pruning by exactly matching at least one tag to keep.
Relates to #9
Ability to exclude versions from pruning by regular expression matching of at least one tag to keep.
@vlaurin
Copy link
Owner Author

vlaurin commented Feb 25, 2022

@FlippievanDyk here you go, this is adding both keep-tags and keep-tags-regexes as multi-line inputs.

Do you want to give it a spin? It got tested as part of the workflow on this PR but outside of that I don't have a use-case for it myself.

You should be able to use it by referencing this branch directly, like so:

steps:
  - name: Prune
    uses: vlaurin/action-ghcr-prune@9-keep-tags
    with:
      token: ${{ secrets.YOUR_TOKEN }}
      organization: your-org
      container: your-container
      dry-run: true # Dry-run first, then change to `false`
      tag-regex: your-regex
      keep-tags: |
        first-tag
        second-tag

For more details, feel free to have a look at the changes to the README and action.yml on this PR. If you are happy with it, I'll release it next.

@FlippievanDyk
Copy link

Do you want to give it a spin? It got tested as part of the workflow on this PR but outside of that I don't have a use-case for it myself.

Awesome! I will try to test it out in this week, and I 'll give feedback as soon as that's done.

@FlippievanDyk
Copy link

Finally got around to testing this.

I don't have a use for keep tags-regex at the moment, but keep-tags works perfectly!

Thank you so much for this, it is exactly what I was after.

@vlaurin
Copy link
Owner Author

vlaurin commented Mar 10, 2022

@FlippievanDyk great, thank you for giving it a spin, I'm going to release it now :)

@vlaurin vlaurin merged commit 4b68674 into main Mar 10, 2022
@vlaurin vlaurin deleted the 9-keep-tags branch March 10, 2022 10:13
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.

Allow for excluded tag when using tag-regex
2 participants