mirror of
https://github.com/cpina/github-action-push-to-another-repository.git
synced 2024-12-22 08:06:10 -07:00
Action is more verbose (in order to help debugging)
This commit is contained in:
parent
f8f86f8d8f
commit
cda33b879b
|
@ -30,6 +30,8 @@ fi
|
||||||
# and set up git (with GIT_CMD variable) and GIT_CMD_REPOSITORY
|
# and set up git (with GIT_CMD variable) and GIT_CMD_REPOSITORY
|
||||||
if [ -n "${SSH_DEPLOY_KEY:=}" ]
|
if [ -n "${SSH_DEPLOY_KEY:=}" ]
|
||||||
then
|
then
|
||||||
|
echo "[+] Using SSH_DEPLOY_KEY"
|
||||||
|
|
||||||
# Inspired by https://github.com/leigholiver/commit-with-deploy-key/blob/main/entrypoint.sh , thanks!
|
# Inspired by https://github.com/leigholiver/commit-with-deploy-key/blob/main/entrypoint.sh , thanks!
|
||||||
mkdir --parents "$HOME/.ssh"
|
mkdir --parents "$HOME/.ssh"
|
||||||
DEPLOY_KEY_FILE="$HOME/.ssh/deploy_key"
|
DEPLOY_KEY_FILE="$HOME/.ssh/deploy_key"
|
||||||
|
@ -45,9 +47,10 @@ then
|
||||||
|
|
||||||
elif [ -n "${API_TOKEN_GITHUB:=}" ]
|
elif [ -n "${API_TOKEN_GITHUB:=}" ]
|
||||||
then
|
then
|
||||||
|
echo "[+] Using API_TOKEN_GITHUB"
|
||||||
GIT_CMD_REPOSITORY="https://$DESTINATION_REPOSITORY_USERNAME:$API_TOKEN_GITHUB@$GITHUB_SERVER/$DESTINATION_REPOSITORY_USERNAME/$DESTINATION_REPOSITORY_NAME.git"
|
GIT_CMD_REPOSITORY="https://$DESTINATION_REPOSITORY_USERNAME:$API_TOKEN_GITHUB@$GITHUB_SERVER/$DESTINATION_REPOSITORY_USERNAME/$DESTINATION_REPOSITORY_NAME.git"
|
||||||
else
|
else
|
||||||
echo "::error::API_TOKEN_GITHUB and SSH_DEPLOY_KEY are empty. Please fill one (recommended the SSH_DEPLOY_KEY"
|
echo "::error::API_TOKEN_GITHUB and SSH_DEPLOY_KEY are empty. Please fill one (recommended the SSH_DEPLOY_KEY)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user