mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-28 18:26:04 +02:00
Merge pull request #905 from DDanii/master
[Draft] remove password from addon updater
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
## 3.16
|
||||||
|
- Removed git password option as it is no longer usable
|
||||||
|
|
||||||
## 3.15
|
## 3.15
|
||||||
- Apply github_tagfilter to dockerhub
|
- Apply github_tagfilter to dockerhub
|
||||||
|
|
||||||
|
|||||||
@@ -68,10 +68,9 @@ Here you define the values that will allow the addon to connect to your reposito
|
|||||||
```yaml
|
```yaml
|
||||||
repository: 'name/repo' coming from github
|
repository: 'name/repo' coming from github
|
||||||
gituser: your github username
|
gituser: your github username
|
||||||
gitpass: your github password
|
gitapi: your github api token(classic) https://github.com/settings/tokens
|
||||||
gitmail: your github email
|
gitmail: your github email
|
||||||
verbose: 'false'
|
verbose: 'false'
|
||||||
gitapi: optional, it is the API key from your github repo
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@@ -79,7 +78,7 @@ Example:
|
|||||||
```yaml
|
```yaml
|
||||||
repository: alexbelgium/hassio-addons
|
repository: alexbelgium/hassio-addons
|
||||||
gituser: your github username
|
gituser: your github username
|
||||||
gitpass: your github password
|
gitapi: your github api token
|
||||||
gitmail: your github email
|
gitmail: your github email
|
||||||
verbose: "false"
|
verbose: "false"
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -14,15 +14,14 @@
|
|||||||
"init": false,
|
"init": false,
|
||||||
"name": "Repository Updater",
|
"name": "Repository Updater",
|
||||||
"options": {
|
"options": {
|
||||||
"gitpass": "gitpassword",
|
"gitapi": "gitapi",
|
||||||
"gituser": "gituser",
|
"gituser": "gituser",
|
||||||
"repository": "alexbelgium/hassio-addons"
|
"repository": "alexbelgium/hassio-addons"
|
||||||
},
|
},
|
||||||
"schema": {
|
"schema": {
|
||||||
"dry_run": "bool?",
|
"dry_run": "bool?",
|
||||||
"gitapi": "str?",
|
"gitapi": "str",
|
||||||
"gitmail": "str?",
|
"gitmail": "str?",
|
||||||
"gitpass": "str",
|
|
||||||
"gituser": "str",
|
"gituser": "str",
|
||||||
"repository": "str",
|
"repository": "str",
|
||||||
"verbose": "bool?"
|
"verbose": "bool?"
|
||||||
@@ -30,5 +29,5 @@
|
|||||||
"slug": "updater",
|
"slug": "updater",
|
||||||
"startup": "once",
|
"startup": "once",
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/addons_updater",
|
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/addons_updater",
|
||||||
"version": "3.15"
|
"version": "3.16"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,12 +18,10 @@ VERBOSE=$(bashio::config 'verbose')
|
|||||||
LOGINFO="... github authentification" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
LOGINFO="... github authentification" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
||||||
|
|
||||||
GITUSER=$(bashio::config 'gituser')
|
GITUSER=$(bashio::config 'gituser')
|
||||||
GITPASS=$(bashio::config 'gitpass')
|
|
||||||
GITMAIL=$(bashio::config 'gitmail')
|
GITMAIL=$(bashio::config 'gitmail')
|
||||||
git config --system http.sslVerify false
|
git config --system http.sslVerify false
|
||||||
git config --system credential.helper 'cache --timeout 7200'
|
git config --system credential.helper 'cache --timeout 7200'
|
||||||
git config --system user.name "${GITUSER}"
|
git config --system user.name "${GITUSER}"
|
||||||
git config --system user.password "${GITPASS}"
|
|
||||||
if [[ "$GITMAIL" != "null" ]]; then git config --system user.email "${GITMAIL}"; fi
|
if [[ "$GITMAIL" != "null" ]]; then git config --system user.email "${GITMAIL}"; fi
|
||||||
|
|
||||||
if bashio::config.has_value 'gitapi'; then
|
if bashio::config.has_value 'gitapi'; then
|
||||||
@@ -229,12 +227,7 @@ for f in */; do
|
|||||||
|
|
||||||
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
|
||||||
|
|
||||||
# if API is set
|
git remote set-url origin "https://${GITUSER}:${GITHUB_API_TOKEN}@github.com/${REPOSITORY}" &>/dev/null
|
||||||
if bashio::config.has_value 'gitapi'; 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
|
# Push
|
||||||
if ! bashio::config.true "dry_run"; then
|
if ! bashio::config.true "dry_run"; then
|
||||||
|
|||||||
Reference in New Issue
Block a user