We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b02700 commit c80145dCopy full SHA for c80145d
entrypoint.sh
@@ -7,15 +7,17 @@ if [[ -z "$GITHUB_TOKEN" ]]; then
7
exit 1
8
fi
9
10
-if [[ -z "$SSH_PRIVATE_KEY" ]]; then
+if [[ ! -z "$SSH_PRIVATE_KEY" ]]; then
11
+ echo "Saving SSH_PRIVATE_KEY"
12
+
13
mkdir -p /root/.ssh
14
echo "$SSH_PRIVATE_KEY" > /root/.ssh/id_rsa
15
chmod 600 /root/.ssh/id_rsa
-fi
16
-# Github action changes $HOME to /github at runtime
17
-# therefore we always copy the SSH key to $HOME (aka. ~)
18
-mkdir -p ~/.ssh
19
-cp /root/.ssh/* ~/.ssh/ 2> /dev/null || true
+ # Github action changes $HOME to /github at runtime
+ # therefore we always copy the SSH key to $HOME (aka. ~)
+ mkdir -p ~/.ssh
20
+ cp /root/.ssh/* ~/.ssh/ 2> /dev/null || true
21
+fi
22
23
sh -c "/github-sync.sh $*"
0 commit comments