Skip to content

Commit b979794

Browse files
TUN-7213: Decode Base64 encoded key before writing it
1 parent 2221325 commit b979794

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

.teamcity/update-homebrew.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
set -euo pipefail
44

55
FILENAME="${PWD}/artifacts/cloudflared-darwin-amd64.tgz"
6-
7-
echo "$GITHUB_PRIVATE_KEY"
8-
96
if ! VERSION="$(git describe --tags --exact-match 2>/dev/null)" ; then
107
echo "Skipping public release for an untagged commit."
118
echo "##teamcity[buildStatus status='SUCCESS' text='Skipped due to lack of tag']"
@@ -34,7 +31,7 @@ SHA256=$(sha256sum "$FILENAME" | cut -b1-64)
3431
# set up git (note that UserKnownHostsFile is an absolute path so we can cd wherever)
3532
mkdir -p tmp
3633
ssh-keyscan -t rsa github.com > tmp/github.txt
37-
echo "$GITHUB_PRIVATE_KEY" > tmp/private.key
34+
echo "$GITHUB_PRIVATE_KEY_B64" | base64 --decode > tmp/private.key
3835
chmod 0400 tmp/private.key
3936
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=$PWD/tmp/github.txt -i $PWD/tmp/private.key -o IdentitiesOnly=yes"
4037

0 commit comments

Comments
 (0)