From 6ea8776db847356cb635e6084c83457e361c73b5 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Fri, 27 Sep 2019 14:41:01 +0900 Subject: [PATCH] rename: PUBLISH_REPO to PUBLISH_REPOSITORY --- entrypoint.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index e581845..ec5e7c8 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -17,9 +17,9 @@ function skip() { } # check values -if [ -z "${PUBLISH_REPO}" ]; then - print_info "setup with PUBLISH_REPO = GITHUB_REPOSITORY" - PUBLISH_REPO=GITHUB_REPOSITORY +if [ -z "${PUBLISH_REPOSITORY}" ]; then + print_info "setup with PUBLISH_REPOSITORY = GITHUB_REPOSITORY" + PUBLISH_REPOSITORY=${GITHUB_REPOSITORY} fi if [ -n "${ACTIONS_DEPLOY_KEY}" ]; then @@ -31,23 +31,23 @@ if [ -n "${ACTIONS_DEPLOY_KEY}" ]; then echo "${ACTIONS_DEPLOY_KEY}" > /root/.ssh/id_rsa chmod 400 /root/.ssh/id_rsa - remote_repo="git@github.com:${PUBLISH_REPO}.git" + remote_repo="git@github.com:${PUBLISH_REPOSITORY}.git" elif [ -n "${PERSONAL_TOKEN}" ]; then print_info "setup with PERSONAL_TOKEN" - remote_repo="https://x-access-token:${PERSONAL_TOKEN}@github.com/${PUBLISH_REPO}.git" + remote_repo="https://x-access-token:${PERSONAL_TOKEN}@github.com/${PUBLISH_REPOSITORY}.git" elif [ -n "${GITHUB_TOKEN}" ]; then print_info "setup with GITHUB_TOKEN" print_error "Do not use GITHUB_TOKEN, See #9" - remote_repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${PUBLISH_REPO}.git" + remote_repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${PUBLISH_REPOSITORY}.git" - if [ -n "${PUBLISH_REPO}" ]; then - if [ "${GITHUB_REPOSITORY}" != "${PUBLISH_REPO}" ]; then + if [ -n "${PUBLISH_REPOSITORY}" ]; then + if [ "${GITHUB_REPOSITORY}" != "${PUBLISH_REPOSITORY}" ]; then echo "can not use GITHUB_TOKEN to deploy to a different repository" exit 1 fi