Inspired by the thread, I wanted to automate the deployment workflow for my HASS config.
My goal was to have HASS automatically pull the config from Github, once the Travis CI build check succeeded.
I added two sensors for getting information from Travis CI regarding the latest build:
Whenever a build is passed in Travis CI, the “sensor.travis_build_label” will return a new label. This state change can be used as a tigger in an automation.
As a result, I just need to push my configuration changes to Github. If the changes will pass the Travis CI check, the new version of the configurations is automatically deployed.
I recently migrated my home assistant setup to run inside a docker container. Therefore, it is not so easy anymore to call git pull from within my container. I wonder how other people are updating their repo from their home assistant automatically?
The only solution so far could be to ssh from the container to the actual host and execute git pull in this way. But this looks more like a hack, so I am curious if there is a cleaner solution to that.
So, I am using a container as well with a volume mounted from the host (per the setup guide) and I have this running as a CRON job every minute on the host machine.
Yes, I run it as a cron job. I have to find out about the 403 I get regularly from Travis, I guess it must be possible to get the build status without authenticating.