From ad0d66803f9faf99e716516600c8bf834a2f8bf9 Mon Sep 17 00:00:00 2001 From: Yorick Rommers Date: Wed, 12 Aug 2026 01:08:08 +0200 Subject: [PATCH] ci: set up mirror SSH credentials before the tag existence check --- .gitea/workflows/windows-release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/windows-release.yml b/.gitea/workflows/windows-release.yml index e3fa82cb..3c3dd957 100644 --- a/.gitea/workflows/windows-release.yml +++ b/.gitea/workflows/windows-release.yml @@ -65,13 +65,6 @@ jobs: REMOTE="git@ssh.github.com:yorickr/plezy.git" - # Already mirrored? Nothing to do (previous run may have succeeded, - # or the tag was pushed to GitHub directly). - if git ls-remote "${REMOTE}" "refs/tags/${TAG}" 2>/dev/null | grep -q .; then - echo "Tag ${TAG} already exists on the GitHub build bridge - nothing to do" - exit 0 - fi - mkdir -p "${HOME}/.ssh" chmod 700 "${HOME}/.ssh" printf '%s\n' "${RELEASE_PUSH_KEY}" > "${HOME}/.ssh/id_ed25519" @@ -83,5 +76,12 @@ jobs: export GIT_SSH_COMMAND="ssh -p 443 -i '${HOME}/.ssh/id_ed25519' -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile='${HOME}/.ssh/known_hosts'" + # Already mirrored? Nothing to do (previous run may have succeeded, + # or the tag was pushed to GitHub directly). + if git ls-remote "${REMOTE}" "refs/tags/${TAG}" 2>/dev/null | grep -q .; then + echo "Tag ${TAG} already exists on the GitHub build bridge - nothing to do" + exit 0 + fi + git push "${REMOTE}" "refs/tags/${TAG}:refs/tags/${TAG}" echo "Mirrored tag ${TAG} to the GitHub build bridge"