fetch everything before trying to tag

This commit is contained in:
Charlotte 🦝 Delenk 2022-04-16 09:36:42 +01:00
parent 01240edb60
commit 1ddaf86d61
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -18,8 +18,8 @@ jobs:
- uses: actions/checkout@v3
- run: |
JOB_NAME=$(echo $JOB_NAME | sed 's|:|/|g')
git tag --list | grep $JOB_NAME || (git tag $JOB_NAME $REV && git push --tags)
git fetch --all --tags
git tag --list | grep $JOB_NAME || (git tag $JOB_NAME $REV && git push --tags)
if [[ ! git merge-base --is-ancestor $REV $JOB_NAME ]]; then
git tag -f $JOB_NAME $REV
git push --tags --force