mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 06:46:58 +00:00
addon/git_pull: enhance with repeat_ignore, corrections, re-ordering (#8257)
* addon/git_pull: enhance with repeat_ignore, corrections, re-ordering * addon/git_pull: restart_ignore: remove trailing slash requirement and some corrections
This commit is contained in:
parent
09cc247d49
commit
e236935b2f
@ -13,12 +13,17 @@ Load and update configuration files for Home Assistant from a [Git](https://git-
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"repository": "https://example.com/my_configs.git",
|
|
||||||
"auto_restart": false,
|
|
||||||
"git_branch": "master",
|
"git_branch": "master",
|
||||||
"git_command": "pull",
|
"git_command": "pull",
|
||||||
"git_remote": "origin",
|
"git_remote": "origin",
|
||||||
"git_prune": "false",
|
"git_prune": "false",
|
||||||
|
"repository": "https://example.com/my_configs.git",
|
||||||
|
"auto_restart": false,
|
||||||
|
"restart_ignore": [
|
||||||
|
"ui-lovelace.yaml",
|
||||||
|
".gitignore",
|
||||||
|
"exampledirectory/"
|
||||||
|
],
|
||||||
"repeat": {
|
"repeat": {
|
||||||
"active": false,
|
"active": false,
|
||||||
"interval": 300
|
"interval": 300
|
||||||
@ -38,22 +43,22 @@ Load and update configuration files for Home Assistant from a [Git](https://git-
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- **repository** (*Required*): Git URL to your repository (make sure to use double quotes). You have to add `.git` to your GitHub repository URL (see example configuration). The contents of the repository is assumed to be the root of Home Assistant `config/` folder. The configuration cannot be in a subdirectory, i.e., `configuration.yaml`, `groups.yaml`, etc. must be in the root of the repository.
|
|
||||||
- **git_branch** (*Required*): Branch name of the Git repo. If left empty, the currently checked out branch will be updated. Leave this as 'master' if you are unsure.
|
- **git_branch** (*Required*): Branch name of the Git repo. If left empty, the currently checked out branch will be updated. Leave this as 'master' if you are unsure.
|
||||||
- **git_remote** (*Required*): Name of the tracked repository. Leave this as `origin` if you are unsure.
|
- **git_command** (*Required*): `pull`/`reset`: Command to run. Leave this as `pull` if you are unsure.
|
||||||
- **git_prune** (*Required*): If set to true, the add-on will cleanup branches that are deleted on the remote repository, but still have cached entries on the local machine. Leave this as `false` if you are unsure.
|
|
||||||
- **git_command** (*Required*): Must be either `pull` or `reset`. Leave this as `pull` if you are unsure.
|
|
||||||
|
|
||||||
* **pull**: Incorporates changes from a remote repository into the current branch. Will preserve any local changes to tracked files.
|
* **pull**: Incorporates changes from a remote repository into the current branch. Will preserve any local changes to tracked files.
|
||||||
* **reset**: Will execute `git reset --hard` and overwrite any local changes to tracked files and update from the remote repository.
|
* **reset**: Will execute `git reset --hard` and overwrite any local changes to tracked files and update from the remote repository. Use with caution.
|
||||||
|
|
||||||
<p class='note warning'>
|
<p class='note warning'>
|
||||||
Using the `reset` option will overwrite changes to tracked files. Tracked files are those visible in the Github repository or those given by the output on this command: `git ls-tree -r master --name-only`.
|
Using the `reset` option will overwrite changes to tracked files. Tracked files are those visible in the git repository or those given by the output on this command: `git ls-tree -r master --name-only`.
|
||||||
</p>
|
</p>
|
||||||
|
- **git_remote** (*Required*): Name of the tracked repository. Leave this as `origin` if you are unsure.
|
||||||
|
- **git_prune** (*Required*): `true`/`false`: If set to true, the add-on will clean-up branches that are deleted on the remote repository, but still have cached entries on the local machine. Leave this as `false` if you are unsure.
|
||||||
|
|
||||||
- **auto_restart** (*Optional*): Restart Home Assistant when the configuration has changed (and is valid).
|
- **repository** (*Required*): Git URL to your repository (make sure to use double quotes). You have to add `.git` to your repository URL (see example configuration).
|
||||||
- **repeat/active** (*Optional*): Pull periodic for Git updates.
|
- **auto_restart** (*Required*): `true`/`false`: Restart Home Assistant when the configuration has changed (and is valid).
|
||||||
- **repeat/interval** (*Optional*): Pull all x seconds and look for changes.
|
- **restart_ignore** (*Optional*): When `auto_restart` is enabled, changes to these files will not make HA restart. Full directories to ignore can be specified.
|
||||||
|
- **repeat**: Poll the repository for updates periodically automatically.
|
||||||
|
* **active** (*Required*): `true`/`false`: Enable/disable automatic polling.
|
||||||
|
* **interval** (*Required*): The interval in seconds to poll the repo for if automatic polling is enabled.
|
||||||
- **deployment_user** (*Optional*): Username to use when authenticating to a repository with a username and password.
|
- **deployment_user** (*Optional*): Username to use when authenticating to a repository with a username and password.
|
||||||
- **deployment_password** (*Optional*): Password to use when authenticating to a repository. Ignored if `deployment_user` is not set.
|
- **deployment_password** (*Optional*): Password to use when authenticating to a repository. Ignored if `deployment_user` is not set.
|
||||||
- **deployment_key** (*Optional*): A private SSH key that will be used for communication during Git operations. This key is mandatory for ssh-accessed repositories, which are the ones with the following pattern: `<user>@<host>:<repository path>`.
|
- **deployment_key** (*Optional*): A private SSH key that will be used for communication during Git operations. This key is mandatory for ssh-accessed repositories, which are the ones with the following pattern: `<user>@<host>:<repository path>`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user