From aa82ef0992daab5eb409c55e1cc51e2ec6e80c84 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Tue, 1 Oct 2019 20:06:09 +0900 Subject: [PATCH] refactor: Use HOME instead of /root --- entrypoint.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 5ab717d..13b6e6f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -21,10 +21,10 @@ if [ -n "${ACTIONS_DEPLOY_KEY}" ]; then print_info "setup with ACTIONS_DEPLOY_KEY" - mkdir /root/.ssh - ssh-keyscan -t rsa github.com > /root/.ssh/known_hosts - echo "${ACTIONS_DEPLOY_KEY}" > /root/.ssh/id_rsa - chmod 400 /root/.ssh/id_rsa + 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" remote_repo="git@github.com:${GITHUB_REPOSITORY}.git" @@ -37,7 +37,7 @@ elif [ -n "${PERSONAL_TOKEN}" ]; then elif [ -n "${GITHUB_TOKEN}" ]; then print_info "setup with GITHUB_TOKEN" - print_error "Do not use GITHUB_TOKEN, See #9" + print_error "GITHUB_TOKEN works only private repo, See #9" remote_repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"