Skip to content

Commit

Permalink
feat: Add SCRIPT_MODE
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Oct 6, 2019
1 parent 64e2296 commit 61ffdec
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ if [ -n "${ACTIONS_DEPLOY_KEY}" ]; then

print_info "setup with ACTIONS_DEPLOY_KEY"

mkdir "${HOME}/.ssh"
ssh-keyscan -t rsa github.com > "${HOME}/.ssh/known_hosts"
echo "${ACTIONS_DEPLOY_KEY}" > "${HOME}/.ssh/id_rsa"
chmod 400 "${HOME}/.ssh/id_rsa"
if [ -n "${SCRIPT_MODE}" ]; then
SSH_DIR="${HOME}/.ssh"
else
SSH_DIR="/root/.ssh"
fi
mkdir "${SSH_DIR}"
ssh-keyscan -t rsa github.com > "${SSH_DIR}/known_hosts"
echo "${ACTIONS_DEPLOY_KEY}" > "${SSH_DIR}/id_rsa"
chmod 400 "${SSH_DIR}/id_rsa"

remote_repo="[email protected]:${PUBLISH_REPOSITORY}.git"

Expand Down

0 comments on commit 61ffdec

Please sign in to comment.