From f5ced6a851ff13437e18d4b9ecf2250c8052b6cb Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sat, 10 Sep 2022 12:29:50 +0200 Subject: [PATCH] Download pgp keys from public route --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 49ec8cb..74c7c53 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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; }