Skip to content

Commit

Permalink
Fix custom keyring path when mirroring repo
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopalet committed Mar 6, 2024
1 parent 69c8596 commit 5cefe95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 3 additions & 3 deletions scripts/publish-apt-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ 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/"

# 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"
Expand Down

0 comments on commit 5cefe95

Please sign in to comment.