I am having issues with a self-hosted Github runner. For some reason, it keeps the tags created, even when I deleted the tags from the repo and locally.
It seems to be
checkout@v2 doesn’t clean the tags in the runner before checkout. So, if for some reason, the job creates a tag, and I re-run the job after deleting the tag from the repo. The job fails because the tag already exists.
I can see in the checkout@v2 logs that previous commits are still there, but it will ignore them:
Checking out the ref /usr/bin/git checkout --progress --force -B pipeline-test refs/remotes/origin/pipeline-test Warning: you are leaving 2 commits behind, not connected to any of your branches: df4cf72 Bump version: 1 → 2 0c0c630 :D If you want to keep them by creating a new branch, this may be a good time to do so with: git branch <new-branch-name> df4cf72 Switched to a new branch 'pipeline-test' Branch 'pipeline-test' set up to track remote branch 'pipeline-test' from 'origin'.
Is there any way to clean those previous commits or tags before continuing with the steps? The checkout@v2 doc says the option
clean is True by default.