Skip to content
Snippets Groups Projects
Commit e23e7ac2 authored by Alexander V. Tikhonov's avatar Alexander V. Tikhonov Committed by Kirill Yukhin
Browse files

github-ci: drop not needed tag on branches commits

We should remove a tag after fetching of a remote repository.
Ported the following commits:

  0f575e01 ('gitlab-ci: fix tag removal for a branch push job')
  0f564f34 ('gitlab-ci: remove tag from pushed branch commit')

Drop a tag that points to a current commit (if any) on a job triggered
by pushing to a branch (as against of pushing a tag). Otherwise we may
get two jobs for the same x.y.z-0-gxxxxxxxxx build: one is run by
pushing a branch and another by pushing a tag. The idea is to hide the
new tag from the branch job as if a tag would be pushed strictly after
all branch jobs for the same commit.

Closes tarantool/tarantool-qa#103
parent db766c52
No related branches found
No related tags found
No related merge requests found
......@@ -39,4 +39,9 @@ runs:
free
fi
fi
# Drop a tag that points to a current commit (if any)
# on a job triggered by pushing to a branch.
if ${{ ! startsWith(github.ref, 'refs/tags/') }}; then
git tag -d "$(git tag --points-at HEAD)" 2>/dev/null || true
fi
shell: bash
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment