[ci] set bot repo via env var

This commit is contained in:
Eugene Yaremenko 2021-07-02 08:29:43 -07:00 committed by GitHub
parent 7882913ee2
commit 2dafdb090b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -47,14 +47,14 @@ if [ $? -ne 0 ]; then
exit 2
fi
fork_url="https://${UPD_BOT_LOGIN}:${UPD_BOT_GIT_TK}"
fork_url+="@github.com/${UPD_BOT_LOGIN}/${PUBLISH}.git"
fork_url+="@github.com/${UPD_BOT_LOGIN}/${UPD_BOT_REPO}.git"
git remote set-url "${UPD_BOT_LOGIN}" "${fork_url}"
echo_headline "Pushing changes"
hub push -f "${UPD_BOT_LOGIN}" "${CIRCLE_BRANCH}" > /dev/null 2>&1
# prevent token leak ^^^^^^^^^^^^^^
if [ $? -ne 0 ]; then
echo "hub push to \"${UPD_BOT_LOGIN}\" failed"
echo "hub push failed"
exit 2
fi