mirror of
https://github.com/cpina/github-action-push-to-another-repository.git
synced 2024-12-22 08:06:10 -07:00
Use the correct variable on git clone of the destination repository
fixes #68
This commit is contained in:
parent
ac0bb2c8f9
commit
aa2fdffb28
|
@ -37,11 +37,11 @@ git config --global user.email "$USER_EMAIL"
|
||||||
git config --global user.name "$USER_NAME"
|
git config --global user.name "$USER_NAME"
|
||||||
|
|
||||||
{
|
{
|
||||||
git clone --single-branch --branch "$TARGET_BRANCH" "https://$USER_NAME:$API_TOKEN_GITHUB@$GITHUB_SERVER/$DESTINATION_REPOSITORY_USERNAME/$DESTINATION_REPOSITORY_NAME.git" "$CLONE_DIR"
|
git clone --single-branch --branch "$TARGET_BRANCH" "https://$DESTINATION_REPOSITORY_USERNAME:$API_TOKEN_GITHUB@$GITHUB_SERVER/$DESTINATION_REPOSITORY_USERNAME/$DESTINATION_REPOSITORY_NAME.git" "$CLONE_DIR"
|
||||||
} || {
|
} || {
|
||||||
echo "::error::Could not clone the destination repository. Command:"
|
echo "::error::Could not clone the destination repository. Command:"
|
||||||
echo "::error::git clone --single-branch --branch $TARGET_BRANCH https://$USER_NAME:the_api_token@$GITHUB_SERVER/$DESTINATION_REPOSITORY_USERNAME/$DESTINATION_REPOSITORY_NAME.git $CLONE_DIR"
|
echo "::error::git clone --single-branch --branch $TARGET_BRANCH https://$DESTINATION_REPOSITORY_USERNAME:the_api_token@$GITHUB_SERVER/$DESTINATION_REPOSITORY_USERNAME/$DESTINATION_REPOSITORY_NAME.git $CLONE_DIR"
|
||||||
echo "::error::(Note that the USER_NAME and API_TOKEN is redacted by GitHub)"
|
echo "::error::(Note that USER_NAME and API_TOKEN is redacted by GitHub)"
|
||||||
echo "::error::Please verify that the target repository exist AND that it contains the destination branch name, and is accesible by the API_TOKEN_GITHUB"
|
echo "::error::Please verify that the target repository exist AND that it contains the destination branch name, and is accesible by the API_TOKEN_GITHUB"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user