I try to set up a CI build that runs a normal build when something gets pushed to master. (https://github.com/esrlabs/chipmunk/actions)
this is the trigger section of my workflow:
name: Main on: push
so that is clear.
What I now try to do is to have a conditional step that is only executed if a tag is pushed
- name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/')
now when I push some commit to master and also tag it, I have 2 git-level operations and this results in running my workflow twice. But since the tag command triggers actions that include those I get on a push command, I’d like to skip this and only react to the tag command.
I tried the –follow-tags option for the git push command but apparently this still ends up in 2 distinct git operations.
Is there a way to avoid the first trigger in case of a pushed git tag?