Improve the error message

This commit is contained in:
Carles Pina i Estany 2021-04-25 10:57:58 +01:00
parent bb3e4ea525
commit 85a0ac138a

View File

@ -35,10 +35,14 @@ mv "$CLONE_DIR/.git" "$TARGET_DIR"
if [ ! -d "$SOURCE_DIRECTORY" ] if [ ! -d "$SOURCE_DIRECTORY" ]
then then
echo "$SOURCE_DIRECTORY does not exist" echo "$SOURCE_DIRECTORY does not exist"
echo "Reminder: github-action-push-to-another-repository does not do the checkout" echo "This directory needs to exist when push-to-another-repository is executed"
echo "from the source GitHub repository. The checkout needs to be done using" echo
echo "a different step. See the actions/checkout@v2 in the example file" echo "In the example it is created by ./build.sh: https://github.com/cpina/push-to-another-repository-example/blob/master/.github/workflows/ci.yml#L19"
echo "https://github.com/cpina/push-to-another-repository-example/blob/master/.github/workflows/ci.yml#L16" echo
echo "If you want to copy a directory that exist in the source repository"
echo "to the target repository: you need to clone the source repository"
echo "in a previous step in the same build section. For example using"
echo "actions/checkout@v2. See: https://github.com/cpina/push-to-another-repository-example/blob/master/.github/workflows/ci.yml#L16"
exit 1 exit 1
fi fi