Skip to content

Commit 1ed13e0

Browse files
committed
Use env dir
1 parent d258981 commit 1ed13e0

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

bin/compile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
#!/usr/bin/env bash
22

3-
set -e
3+
env_dir=$3
4+
ssh_key="$(cat $env_dir/SSH_KEY)"
45

5-
echo "-----> Running SSH private key setup"
6+
if [ "$ssh_key" != "" ]; then
7+
echo "-----> Running SSH private key setup"
68

7-
echo "$SSH_KEY" | base64 --decode > id_rsa
8-
eval `ssh-agent -s`
9-
ssh-add id_rsa
10-
ssh -oStrictHostKeyChecking=no -T git@github.com || true
11-
rm id_rsa
9+
echo "$ssh_key" | base64 --decode > id_rsa
10+
eval `ssh-agent -s` || exit $?
11+
ssh-add id_rsa || exit $?
12+
ssh -oStrictHostKeyChecking=no -T git@github.com
13+
rm id_rsa
14+
else
15+
echo "-----> No SSH private key"
16+
fi

bin/detect

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
#!/usr/bin/env bash
22

3-
if [ -z "$SSH_KEY" ]; then
4-
echo "no"
5-
exit 1
6-
else
7-
echo "SSH private key"
8-
exit 0
9-
fi
3+
echo "SSH private key"
4+
exit 0

0 commit comments

Comments
 (0)