From 5cefe952f2ba75f42cbf31febf58e92b3fba2014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Palet?= Date: Wed, 6 Mar 2024 14:07:04 +0000 Subject: [PATCH] Fix custom keyring path when mirroring repo --- .github/workflows/release.yaml | 1 - scripts/publish-apt-packages.sh | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8361e97b..dd719552 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -68,7 +68,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.CLI_RELEASE }} GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - name: Publish packages to APT repo - if: contains(github.ref_name, '-') == false env: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} GPG_PRIVATE_KEY_ID: ${{ steps.import_gpg.outputs.keyid }} diff --git a/scripts/publish-apt-packages.sh b/scripts/publish-apt-packages.sh index 8b468171..0a15a629 100755 --- a/scripts/publish-apt-packages.sh +++ b/scripts/publish-apt-packages.sh @@ -10,7 +10,7 @@ OBJECT_STORAGE_ENDPOINT="https://object.storage.eu01.onstackit.cloud" APT_BUCKET_NAME="stackit-cli-apt" PUBLIC_KEY_BUCKET_NAME="stackit-public-key" PUBLIC_KEY_FILE="key.gpg" -CUSTOM_KEYRING="custom-keyring" +CUSTOM_KEYRING_FILE="custom-keyring.gpg" DISTRIBUTION="stackit" APTLY_CONFIG_FILE_PATH="./.aptly.conf" GORELEASER_PACKAGES_FOLDER="dist/" @@ -18,8 +18,8 @@ GORELEASER_PACKAGES_FOLDER="dist/" # Create a local mirror of the current state of the remote APT repository printf ">>> Creating mirror \n" curl ${OBJECT_STORAGE_ENDPOINT}/${PUBLIC_KEY_BUCKET_NAME}/${PUBLIC_KEY_FILE} >public.asc -gpg --no-default-keyring --keyring ./${CUSTOM_KEYRING}.gpg --import public.asc -aptly mirror create -keyring="${CUSTOM_KEYRING}.gpg" current "${OBJECT_STORAGE_ENDPOINT}/${APT_BUCKET_NAME}" ${DISTRIBUTION} +gpg --no-default-keyring --keyring ${CUSTOM_KEYRING_FILE} --import public.asc +aptly mirror create -keyring="${CUSTOM_KEYRING_FILE}" current "${OBJECT_STORAGE_ENDPOINT}/${APT_BUCKET_NAME}" ${DISTRIBUTION} # Update the mirror to the latest state printf "\n>>> Updating mirror \n"