Tip to have free continuous automation for hassio addons repository

You can use travis to build and publish the images on docker hub for free. I use it to publish my addons for multiple arch, based on the hassio build script.

Each addon is build and publish for all the arch or for those present in config.json. An addon new version is publish only if there is some modification in the corresponding files (ie any file inside the addon folder except the README.md).

You need to have a (free) travis account and link it to your github account. Once you have activated the continuous integration for your repository, you will need to create some environment variables on the travis settings, to securely store your docker credentials (DOCKER_PASS and DOCKER_USER) in travis.yaml

The file to look at are :

1 Like

Great setup, I’ve actually changed it a bit to avoid duplicates:

before_install:
  - sudo apt-get install jq
  - wget https://raw.githubusercontent.com/bestlibre/hassio-addons/master/build.sh -O build.sh
  - chmod u+x build.sh
  - wget https://raw.githubusercontent.com/home-assistant/hassio-build/master/build-scripts/addons/create_hassio_addon.sh -O create_hassio_addon.sh
  - chmod u+x create_hassio_addon.sh

I’m downloading your build script and official hass.io one. So when base image will change (like this week) I won’t need to change my code :slight_smile:

Thank you for sharing this!

P.S. If someone is experiencing issues with global npm install on armhf , simply wrap execution with

npm config set unsafe-perm true
npm install  -g ...
npm config set unsafe-perm false