From fd02997068710ce8de7d8e87f08ab000ceb90573 Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Mon, 6 Jan 2020 23:10:35 +0900 Subject: [PATCH] fix: link to commit hash for external deployment (#73) cf. #72 --- entrypoint.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 663f9d4..af3ad95 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -117,7 +117,13 @@ git remote add origin "${remote_repo}" git add --all print_info "Allowing empty commits: ${INPUT_EMPTYCOMMITS}" -COMMIT_MESSAGE="Automated deployment: $(date -u) ${GITHUB_SHA}" + +if [ -n "${EXTERNAL_REPOSITORY}" ]; then + COMMIT_MESSAGE="Automated deployment: $(date -u) ${GITHUB_REPOSITORY}@${GITHUB_SHA}" +else + COMMIT_MESSAGE="Automated deployment: $(date -u) ${GITHUB_SHA}" +fi + if [[ ${INPUT_EMPTYCOMMITS} == "false" ]]; then git commit -m "${COMMIT_MESSAGE}" || skip else