Bump CLI to v5.0.0 (#200) #302
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build plugin | |
| on: | |
| pull_request: | |
| branches: ["master"] | |
| release: | |
| types: ["published"] | |
| push: | |
| branches: ["master"] | |
| paths: | |
| - Dockerfile | |
| - 'rootfs/**' | |
| env: | |
| ARCHITECTURES: '["amd64", "aarch64"]' | |
| BUILD_NAME: cli | |
| BUILD_TYPE: plugin | |
| IMAGE_NAME: hassio-cli | |
| permissions: | |
| contents: read | |
| jobs: | |
| init: | |
| name: Initialize build | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| channel: ${{ steps.version.outputs.channel }} | |
| publish: ${{ steps.version.outputs.publish }} | |
| matrix: ${{ steps.matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get version | |
| id: version | |
| uses: home-assistant/actions/helpers/version@master | |
| with: | |
| type: ${{ env.BUILD_TYPE }} | |
| - name: Get build matrix | |
| id: matrix | |
| uses: home-assistant/builder/actions/prepare-multi-arch-matrix@62a1597b84b3461abad9816d9cd92862a2b542c3 # 2026.03.2 | |
| with: | |
| architectures: ${{ env.ARCHITECTURES }} | |
| image-name: ${{ env.IMAGE_NAME }} | |
| build: | |
| name: Build ${{ matrix.arch }} image | |
| needs: init | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.init.outputs.matrix) }} | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Build image | |
| id: build | |
| uses: home-assistant/builder/actions/build-image@62a1597b84b3461abad9816d9cd92862a2b542c3 # 2026.03.2 | |
| with: | |
| arch: ${{ matrix.arch }} | |
| container-registry-password: ${{ secrets.GITHUB_TOKEN }} | |
| cosign-base-identity: 'https://github.com/home-assistant/docker-base/.*' | |
| cosign-base-verify: ghcr.io/home-assistant/base:3.23 | |
| image: ${{ matrix.image }} | |
| image-tags: | | |
| ${{ needs.init.outputs.version }} | |
| latest | |
| push: ${{ needs.init.outputs.publish == 'true' }} | |
| version: ${{ needs.init.outputs.version }} | |
| manifest: | |
| name: Publish multi-arch manifest | |
| needs: [init, build] | |
| if: needs.init.outputs.publish == 'true' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| packages: write | |
| steps: | |
| - name: Publish multi-arch manifest | |
| uses: home-assistant/builder/actions/publish-multi-arch-manifest@62a1597b84b3461abad9816d9cd92862a2b542c3 # 2026.03.2 | |
| with: | |
| architectures: ${{ env.ARCHITECTURES }} | |
| container-registry-password: ${{ secrets.GITHUB_TOKEN }} | |
| image-name: ${{ env.IMAGE_NAME }} | |
| image-tags: | | |
| ${{ needs.init.outputs.version }} | |
| latest | |
| version: | |
| name: Update version | |
| if: github.repository_owner == 'home-assistant' | |
| needs: [init, build, manifest] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the repository | |
| if: needs.init.outputs.publish == 'true' | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Initialize git | |
| if: needs.init.outputs.publish == 'true' | |
| uses: home-assistant/actions/helpers/git-init@master | |
| with: | |
| name: ${{ secrets.GIT_NAME }} | |
| email: ${{ secrets.GIT_EMAIL }} | |
| token: ${{ secrets.GIT_TOKEN }} | |
| - name: Update version file | |
| if: needs.init.outputs.publish == 'true' | |
| uses: home-assistant/actions/helpers/version-push@master | |
| with: | |
| key: ${{ env.BUILD_NAME }} | |
| version: ${{ needs.init.outputs.version }} | |
| channel: ${{ needs.init.outputs.channel }} |