mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-22 15:26:04 +02:00
Change upload if api set
https://github.com/alexbelgium/hassio-addons/issues/303
This commit is contained in:
@@ -181,7 +181,15 @@ if [ -f /data/"$BASENAME"/"$f"/updater.json ]; then
|
|||||||
git commit -m "Updater bot : $SLUG updated to ${LASTVERSION}" >/dev/null
|
git commit -m "Updater bot : $SLUG updated to ${LASTVERSION}" >/dev/null
|
||||||
|
|
||||||
LOGINFO="... $SLUG : push to github" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
LOGINFO="... $SLUG : push to github" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
||||||
git remote set-url origin "https://${GITUSER}:${GITPASS}@github.com/${REPOSITORY}" &>/dev/null
|
|
||||||
|
# if API is set
|
||||||
|
if bashio::config.has_value 'GITHUB_API_TOKEN'; then
|
||||||
|
git remote set-url origin "https://${GITUSER}:${GITHUB_API_TOKEN}@github.com/${REPOSITORY}" &>/dev/null
|
||||||
|
else
|
||||||
|
git remote set-url origin "https://${GITUSER}:${GITPASS}@github.com/${REPOSITORY}" &>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Push
|
||||||
git push &>/dev/null
|
git push &>/dev/null
|
||||||
|
|
||||||
#Log
|
#Log
|
||||||
|
|||||||
Reference in New Issue
Block a user