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

Provide option to clean local tags #715

Open
randymarsh77 opened this issue Mar 4, 2022 · 0 comments
Open

Provide option to clean local tags #715

randymarsh77 opened this issue Mar 4, 2022 · 0 comments

Comments

@randymarsh77
Copy link

I saw a handful of issues related to "tags", but not this specifically.

Problem:
Some tools (e.g. semantic-release) will create a local tag (e.g. for a new release), and then push the tag, and then perform an operation (e.g. the release). If the push or the operation fails, the local tag will remain in the checkout on the runner.

actions/checkout provides options to clean the checkout, but this clean does not delete local tags (for good reason), so these are for all intents and purposes "leaked artifacts" from a previous run.

It's possible that fetch-depth: 0 might have an effect on local tags (I haven't tested this, and in any case, fetch-depth: 1 will still have this problem).

There is also this related issue: #701 which could provide a solution provided local tags are cleaned up when (re)fetching tags.

Proposition:
Either leverage the existing fetch-depth and clean options to remove local tags in an appropriate way for those options, or add additional opt-in configuration to clean tags (and, fetch tags outside of fetch-depth).

Re "appropriate way": I would expect a checkout that does clean and does not have fetch-depth: 0 to not have any local tags after actions/checkout runs, so it seems safe to delete all the local tags automatically in this scenario. However, that might be an undesirable change to previous behavior.

Thank you for your consideration!

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

1 participant