Skip to content

Commit

Permalink
fix Dockerfile bug
Browse files Browse the repository at this point in the history
Signed-off-by: xiexianbin <[email protected]>
  • Loading branch information
xiexianbin committed Jun 2, 2022
1 parent 7ee04f0 commit 8997291
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

DEBUG="${INPUT_DEBUG}"

if [[ "$DEBUG" == "true" ]]; then
if [[ X"$DEBUG" == X"true" ]]; then
set -x
fi

Expand All @@ -17,7 +17,10 @@ echo "## Init Git Config ##################"
git config --global --add safe.directory /github/workspace/${PUBLISH_DIR}

echo "## Setup Deploy keys ##################"
mkdir /root/.ssh
[ -d /root/.ssh ] || mkdir /root/.ssh
if [ X"$INPUTE_SSH_KEYSCANS" = X"" ]; then
INPUTE_SSH_KEYSCANS="github.com,gitee.com"
fi
GIT_HOST_ARRAY=(${INPUTE_SSH_KEYSCANS//,/ })
for host in ${GIT_HOST_ARRAY[@]}; do
# ssh-keyscan -t rsa $host >> /root/.ssh/known_hosts
Expand All @@ -30,7 +33,7 @@ if [ X"$INPUT_DST_KEY" = X"" ]; then
echo "## Skip ssh key deploy ##################"
else
DST_KEY="/root/.ssh/git_key"
echo ${INPUT_DST_KEY} > ${DST_KEY}
echo "${INPUT_DST_KEY}" > ${DST_KEY}
chmod 400 ${DST_KEY}
ls -lhart ${DST_KEY}
fi
Expand Down

0 comments on commit 8997291

Please sign in to comment.