{"id":13581231,"url":"https://github.com/home-assistant/builder","last_synced_at":"2025-05-16T14:07:08.669Z","repository":{"id":37748935,"uuid":"181371487","full_name":"home-assistant/builder","owner":"home-assistant","description":"Home Assistant builder script","archived":false,"fork":false,"pushed_at":"2025-04-23T09:18:46.000Z","size":209,"stargazers_count":78,"open_issues_count":11,"forks_count":67,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-07T21:39:20.683Z","etag":null,"topics":["docker"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/home-assistant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-14T21:31:55.000Z","updated_at":"2025-05-04T09:50:39.000Z","dependencies_parsed_at":"2023-02-09T11:31:49.947Z","dependency_job_id":"777b566a-09b1-41a6-9355-0ed856ce32e0","html_url":"https://github.com/home-assistant/builder","commit_stats":{"total_commits":222,"total_committers":25,"mean_commits":8.88,"dds":0.472972972972973,"last_synced_commit":"89e299c79a42b3d5403fe8455d0450f86a8295e5"},"previous_names":[],"tags_count":83,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant%2Fbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant%2Fbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant%2Fbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/home-assistant%2Fbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/home-assistant","download_url":"https://codeload.github.com/home-assistant/builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254358863,"owners_count":22058002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker"],"created_at":"2024-08-01T15:01:59.394Z","updated_at":"2025-05-16T14:07:08.649Z","avatar_url":"https://github.com/home-assistant.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Home Assistant builder\n\n_Multi-purpose cross-compile docker builder._\n\n## GitHub Action\n\nYou can use this repository as a GitHub action to test and/or publish your builds.\n\nUse the `with.args` key to pass in arguments to the builder, to see what arguments are supported you can look at the [arguments](#Arguments) section.\n\n### Cosign support\n\nYou can use cosign to signing and verify the build chain. To sign the image, use `--cosign` and attach following options to the github action:\n\n```yaml\njobs:\n  build:\n    name: Test build\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      packages: write\n      id-token: write\n```\n\nFor keep a trust-chain during the built, you need set `identity` and `base_identity` to your build.yml\n\n### Test action example\n\n```yaml\nname: \"Test\"\n\non: [push, pull_request]\n\njobs:\n  build:\n    name: Test build\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@v3\n      - name: Test build\n        uses: home-assistant/builder@master\n        with:\n          args: |\n            --test \\\n            --all \\\n            --target addon-folder \\\n            --docker-hub user-name-or-space-name\n```\n\n### Publish action example\n\n```yaml\nname: \"Publish\"\n\non:\n  release:\n    types: [published]\n\njobs:\n  publish:\n    name: Publish\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@v3\n      - name: Login to DockerHub\n        uses: docker/login-action@v2\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n      - name: Publish\n        uses: home-assistant/builder@master\n        with:\n          args: |\n            --all \\\n            --target addon-folder \\\n            --docker-hub user-name-or-space-name\n```\n\n## Arguments\n\n```\nOptions:\n  -h, --help\n        Display this help and exit.\n\n  Repository / Data\n    -r, --repository \u003cREPOSITORY\u003e\n        Set git repository to load data from.\n    -b, --branch \u003cBRANCH\u003e\n        Set git branch for repository.\n    -t, --target \u003cPATH_TO_BUILD\u003e\n        Set local folder or path inside repository for build.\n\n  Version/Image handling\n    -v, --version \u003cVERSION\u003e\n        Overwrite version/tag of build.\n    -i, --image \u003cIMAGE_NAME\u003e\n        Overwrite image name of build / support {arch}.\n    --release \u003cVERSION\u003e\n        Additional version information like for base images.\n    --release-tag\n        Use this as main tag.\n    --additional-tag\n        Add additional tags that will be published\n    --version-from \u003cVERSION\u003e\n        Use this to set build_from tag if not specified.\n\n  Architecture\n    --armhf\n        Build for arm v6.\n    --armv7\n        Build for arm v7.\n    --amd64\n        Build for intel/amd 64bit.\n    --aarch64\n        Build for arm 64bit.\n    --i386\n        Build for intel/amd 32bit.\n    --all\n        Build all architecture.\n\n  Build handling\n    --test\n       Disable push to dockerhub.\n    --no-latest\n       Do not tag images as latest.\n    --no-cache\n       Disable cache for the build (from latest).\n    --self-cache\n       Use same tag as cache tag instead latest.\n    --cache-tag \u003cTAG\u003e\n       Use a custom tag for the build cache.\n    -d, --docker-hub \u003cDOCKER_REPOSITORY\u003e\n       Set or overwrite the docker repository.\n    --docker-hub-check\n       Check if the version already exists before starting the build.\n    --docker-user \u003cUSER\u003e\n       Username to login into docker with\n    --docker-password \u003cPASSWORD\u003e\n       Password to login into docker with\n\n    Use the host docker socket if mapped into container:\n       /var/run/docker.sock\n\n  Internals:\n    --addon\n        Default on. Run all things for an addon build.\n    --generic \u003cVERSION\u003e\n        Build based on the build.json\n    --base \u003cVERSION\u003e\n        Build our base images.\n    --machine \u003cVERSION=ALL,X,Y\u003e\n        Build the machine based image for a release/landingpage.\n\n  Security:\n    --cosign\n        Enable signing images with cosign.\n```\n\n## Local installation\n\namd64:\n\n```bash\ndocker pull ghcr.io/home-assistant/amd64-builder:latest\n```\n\narmv7:\n\n```bash\ndocker pull ghcr.io/home-assistant/armv7-builder:latest\n```\n\naarch64:\n\n```bash\ndocker pull ghcr.io/home-assistant/aarch64-builder:latest\n```\n\n## Run\n\n**For remote git repository:**\n\n```bash\ndocker run \\\n\t--rm \\\n\t--privileged \\\n\t-v ~/.docker:/root/.docker \\\n    ghcr.io/home-assistant/amd64-builder:latest \\\n\t\t--all \\\n\t\t-t addon-folder \\\n\t\t-r https://github.com/xy/addons \\\n\t\t-b branchname\n```\n\n**For local git repository:**\n\n```bash\ndocker run \\\n\t--rm \\\n\t--privileged \\\n\t-v ~/.docker:/root/.docker \\\n\t-v /my_addon:/data \\\n    ghcr.io/home-assistant/amd64-builder:latest \\\n\t\t--all \\\n\t\t-t /data\n```\n\n## Docker Daemon\n\nBy default, the image will run docker-in-docker. You can use the host docker daemon by bind mounting the host docker socket to `/var/run/docker.sock` inside the container. For example, to do this with the _Local repository_ example above (assuming the host docker socket is at `/var/run/docker.sock`:\n\n```bash\ndocker run \\\n\t--rm \\\n\t--privileged \\\n\t-v ~/.docker:/root/.docker \\\n\t-v /var/run/docker.sock:/var/run/docker.sock:ro \\\n\t-v /my_addon:/data \\\n    ghcr.io/home-assistant/amd64-builder:latest \\\n\t\t--all \\\n\t\t-t /data\n```\n\n### Using shell alias\n\nOn Linux, it can be helpful to use a shell alias to run the builder from the\ncurrent directory. E.g. by adding the following function to your `~/.bashrc`:\n\n```\nfunction builder() {\n\tdocker run \\\n\t  --rm \\\n\t  -it \\\n\t  --privileged \\\n\t  -v ${PWD}:/data \\\n\t  -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n      ghcr.io/home-assistant/amd64-builder:latest --target /data $@\n}\n```\n\nThis allows to build add-ons e.g. for a single architecture as follow:\n```\n$ cd /path/to/your/add-on\n$ builder --amd64 --docker-hub agners\n```\n\n## Help\n\n```bash\ndocker run --rm --privileged ghcr.io/home-assistant/amd64-builder:latest --help\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhome-assistant%2Fbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhome-assistant%2Fbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhome-assistant%2Fbuilder/lists"}