mirror of
https://github.com/cpina/github-action-push-to-another-repository.git
synced 2025-09-03 15:35:45 -06:00
Add --depth 1
to save time and bandwidth
Since we need to download only the last snapshot, it is not necessary to download the full commits history.
This commit is contained in:
parent
483689a71c
commit
7063eebf04
@ -34,7 +34,7 @@ git config --global user.email "$USER_EMAIL"
|
||||
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 --depth 1 --branch "$TARGET_BRANCH" "https://$USER_NAME:$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::git clone --single-branch --branch $TARGET_BRANCH https://$USER_NAME:the_api_token@$GITHUB_SERVER/$DESTINATION_REPOSITORY_USERNAME/$DESTINATION_REPOSITORY_NAME.git $CLONE_DIR"
|
||||
|
Loading…
x
Reference in New Issue
Block a user