[ubuntu] Remove apt-key from build scripts (#9082)

This commit is contained in:
Shamil Mubarakshin
2023-12-29 18:11:55 +01:00
committed by GitHub
parent 1658c2e905
commit 266f9413d3
5 changed files with 52 additions and 25 deletions

View File

@@ -4,16 +4,19 @@
## Desc: Install Heroku CLI. Based on instructions found here: https://devcenter.heroku.com/articles/heroku-cli
################################################################################
# add heroku repository to apt
echo "deb https://cli-assets.heroku.com/channels/stable/apt ./" > /etc/apt/sources.list.d/heroku.list
REPO_URL="https://cli-assets.heroku.com/channels/stable/apt"
GPG_KEY="/usr/share/keyrings/heroku.gpg"
REPO_PATH="/etc/apt/sources.list.d/heroku.list"
# install heroku's release key for package verification
curl https://cli-assets.heroku.com/channels/stable/apt/release.key | apt-key add -
# add heroku repository to apt
curl -fsSL "${REPO_URL}/release.key" | gpg --dearmor -o $GPG_KEY
echo "deb [signed-by=$GPG_KEY] $REPO_URL ./" > $REPO_PATH
# install heroku
apt-get update -y && apt-get install -y heroku
# remove heroku's apt repository
rm /etc/apt/sources.list.d/heroku.list
rm $REPO_PATH
rm $GPG_KEY
invoke_tests "Tools" "Heroku"