Github Actions Fail When Pushing Tags

Hello, I have a GitHub action running on a self-hosted M1 Mac Mini that creates tags in the repo and pushes them. However, somehow tags exist locally that also exist on remote, but pushing them now causes an error.

My question is: Why does the GitHub action-runner not clean up tags between runs? Seems like when the action is not self-hosted, the new system wouldn’t have tags around from previous runs, but it’s not being cleaned up when running multiple actions on the same machine/repo.

CleanShot 2021-05-20 at 13.34.21@2x

It is possible that I don’t understand part of your process and the repository that your screenshot references isn’t public so I can’t investigate any further but you might be confused about what happens in your action when you push a tag.

When your action pushes a tag to the repository it is no longer just local. Once pushed it will exist in any cloned copy of the repository. So this doesn’t seem to be an issue with cleaning. See Managing tags - GitHub Docs and Git - Tagging