Download pgp keys from public route
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details

This commit is contained in:
nemunaire 2022-09-10 12:29:50 +02:00
parent f0f6ea3112
commit f5ced6a851
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ steps:
- echo "$${SSH_PRIVATE_KEY}" > ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519
- echo -e "Host *\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- echo "$${USER_PGP_PUBKEY}$${USER_PGP_PUBKEY_0}$${USER_PGP_PUBKEY_1}$${USER_PGP_PUBKEY_2}$${USER_PGP_PUBKEY_3}$${USER_PGP_PUBKEY_4}$${USER_PGP_PUBKEY_5}$${USER_PGP_PUBKEY_6}$${USER_PGP_PUBKEY_7}$${USER_PGP_PUBKEY_8}$${USER_PGP_PUBKEY_9}" > user.gpg && gpg --import user.gpg || true
- wget -O ~/keys.gpg "https://lessons.nemunai.re/api/users/$${LOGIN}/pgp_keys" && gpg --import ~/keys.gpg || true
- git ls-remote --tags "${REPO_URL}" | grep -q "refs/tags/${REPO_TAG}" || { echo "No tag found (was looking for ${REPO_TAG})" >&2; exit 1; }
- git clone --depth 1 --branch $$(git ls-remote --tags "${REPO_URL}" | grep "refs/tags/${REPO_TAG}" | tail -n 1 | sed 's@/@ @;s@/@ @;s@\^{}$@@' | awk '{ print $$4 }') ${REPO_URL} "/work/${LOGIN}"
- git -C "/work/${LOGIN}" verify-tag --raw $$(git ls-remote --tags "${REPO_URL}" | grep "refs/tags/${REPO_TAG}" | tail -n 1 | sed 's@/@ @;s@/@ @;s@\^{}$@@' | awk '{ print $$4 }') || { echo "Tag verification failed" >&2; exit 2; }