|
|
|
|
@@ -46,10 +46,10 @@ jobs:
|
|
|
|
|
with:
|
|
|
|
|
type: ${{ env.BUILD_TYPE }}
|
|
|
|
|
|
|
|
|
|
- name: Verify version
|
|
|
|
|
uses: home-assistant/actions/helpers/verify-version@master
|
|
|
|
|
with:
|
|
|
|
|
ignore-dev: true
|
|
|
|
|
# - name: Verify version
|
|
|
|
|
# uses: home-assistant/actions/helpers/verify-version@master
|
|
|
|
|
# with:
|
|
|
|
|
# ignore-dev: true
|
|
|
|
|
|
|
|
|
|
- name: Fail if translations files are checked in
|
|
|
|
|
run: |
|
|
|
|
|
@@ -88,10 +88,6 @@ jobs:
|
|
|
|
|
fail-fast: false
|
|
|
|
|
matrix:
|
|
|
|
|
arch: ${{ fromJson(needs.init.outputs.architectures) }}
|
|
|
|
|
exclude:
|
|
|
|
|
- arch: armv7
|
|
|
|
|
- arch: armhf
|
|
|
|
|
- arch: i386
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout the repository
|
|
|
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
|
@@ -166,6 +162,18 @@ jobs:
|
|
|
|
|
sed -i "s|home-assistant-intents==.*||" requirements_all.txt
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
- name: Adjustments for armhf
|
|
|
|
|
if: matrix.arch == 'armhf'
|
|
|
|
|
run: |
|
|
|
|
|
# Pandas has issues building on armhf, it is expected they
|
|
|
|
|
# will drop the platform in the near future (they consider it
|
|
|
|
|
# "flimsy" on 386). The following packages depend on pandas,
|
|
|
|
|
# so we comment them out.
|
|
|
|
|
sed -i "s|env-canada|# env-canada|g" requirements_all.txt
|
|
|
|
|
sed -i "s|noaa-coops|# noaa-coops|g" requirements_all.txt
|
|
|
|
|
sed -i "s|pyezviz|# pyezviz|g" requirements_all.txt
|
|
|
|
|
sed -i "s|pykrakenapi|# pykrakenapi|g" requirements_all.txt
|
|
|
|
|
|
|
|
|
|
- name: Download translations
|
|
|
|
|
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
|
|
|
|
with:
|
|
|
|
|
@@ -199,254 +207,284 @@ jobs:
|
|
|
|
|
--target /data \
|
|
|
|
|
--generic ${{ needs.init.outputs.version }}
|
|
|
|
|
|
|
|
|
|
build_machine:
|
|
|
|
|
name: Build ${{ matrix.machine }} machine core image
|
|
|
|
|
if: github.repository_owner == 'home-assistant'
|
|
|
|
|
needs: ["init", "build_base"]
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
permissions:
|
|
|
|
|
contents: read
|
|
|
|
|
packages: write
|
|
|
|
|
id-token: write
|
|
|
|
|
strategy:
|
|
|
|
|
matrix:
|
|
|
|
|
machine:
|
|
|
|
|
- generic-x86-64
|
|
|
|
|
- intel-nuc
|
|
|
|
|
- khadas-vim3
|
|
|
|
|
- odroid-c2
|
|
|
|
|
- odroid-c4
|
|
|
|
|
- odroid-m1
|
|
|
|
|
- odroid-n2
|
|
|
|
|
- qemuarm-64
|
|
|
|
|
- qemux86-64
|
|
|
|
|
- raspberrypi3-64
|
|
|
|
|
- raspberrypi4-64
|
|
|
|
|
- raspberrypi5-64
|
|
|
|
|
- yellow
|
|
|
|
|
- green
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout the repository
|
|
|
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
|
# build_machine:
|
|
|
|
|
# name: Build ${{ matrix.machine }} machine core image
|
|
|
|
|
# if: github.repository_owner == 'home-assistant'
|
|
|
|
|
# needs: ["init", "build_base"]
|
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
|
# permissions:
|
|
|
|
|
# contents: read
|
|
|
|
|
# packages: write
|
|
|
|
|
# id-token: write
|
|
|
|
|
# strategy:
|
|
|
|
|
# matrix:
|
|
|
|
|
# machine:
|
|
|
|
|
# - generic-x86-64
|
|
|
|
|
# - intel-nuc
|
|
|
|
|
# - khadas-vim3
|
|
|
|
|
# - odroid-c2
|
|
|
|
|
# - odroid-c4
|
|
|
|
|
# - odroid-m1
|
|
|
|
|
# - odroid-n2
|
|
|
|
|
# - odroid-xu
|
|
|
|
|
# - qemuarm
|
|
|
|
|
# - qemuarm-64
|
|
|
|
|
# - qemux86
|
|
|
|
|
# - qemux86-64
|
|
|
|
|
# - raspberrypi
|
|
|
|
|
# - raspberrypi2
|
|
|
|
|
# - raspberrypi3
|
|
|
|
|
# - raspberrypi3-64
|
|
|
|
|
# - raspberrypi4
|
|
|
|
|
# - raspberrypi4-64
|
|
|
|
|
# - raspberrypi5-64
|
|
|
|
|
# - tinker
|
|
|
|
|
# - yellow
|
|
|
|
|
# - green
|
|
|
|
|
# steps:
|
|
|
|
|
# - name: Checkout the repository
|
|
|
|
|
# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
|
|
|
|
|
|
- name: Set build additional args
|
|
|
|
|
run: |
|
|
|
|
|
# Create general tags
|
|
|
|
|
if [[ "${{ needs.init.outputs.version }}" =~ d ]]; then
|
|
|
|
|
echo "BUILD_ARGS=--additional-tag dev" >> $GITHUB_ENV
|
|
|
|
|
elif [[ "${{ needs.init.outputs.version }}" =~ b ]]; then
|
|
|
|
|
echo "BUILD_ARGS=--additional-tag beta" >> $GITHUB_ENV
|
|
|
|
|
else
|
|
|
|
|
echo "BUILD_ARGS=--additional-tag stable" >> $GITHUB_ENV
|
|
|
|
|
fi
|
|
|
|
|
# - name: Set build additional args
|
|
|
|
|
# run: |
|
|
|
|
|
# # Create general tags
|
|
|
|
|
# if [[ "${{ needs.init.outputs.version }}" =~ d ]]; then
|
|
|
|
|
# echo "BUILD_ARGS=--additional-tag dev" >> $GITHUB_ENV
|
|
|
|
|
# elif [[ "${{ needs.init.outputs.version }}" =~ b ]]; then
|
|
|
|
|
# echo "BUILD_ARGS=--additional-tag beta" >> $GITHUB_ENV
|
|
|
|
|
# else
|
|
|
|
|
# echo "BUILD_ARGS=--additional-tag stable" >> $GITHUB_ENV
|
|
|
|
|
# fi
|
|
|
|
|
|
|
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
|
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
|
|
|
|
with:
|
|
|
|
|
registry: ghcr.io
|
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
# - name: Login to GitHub Container Registry
|
|
|
|
|
# uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
|
|
|
|
# with:
|
|
|
|
|
# registry: ghcr.io
|
|
|
|
|
# username: ${{ github.repository_owner }}
|
|
|
|
|
# password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
|
|
# home-assistant/builder doesn't support sha pinning
|
|
|
|
|
- name: Build base image
|
|
|
|
|
uses: home-assistant/builder@2025.09.0
|
|
|
|
|
with:
|
|
|
|
|
args: |
|
|
|
|
|
$BUILD_ARGS \
|
|
|
|
|
--target /data/machine \
|
|
|
|
|
--cosign \
|
|
|
|
|
--machine "${{ needs.init.outputs.version }}=${{ matrix.machine }}"
|
|
|
|
|
# # home-assistant/builder doesn't support sha pinning
|
|
|
|
|
# - name: Build base image
|
|
|
|
|
# uses: home-assistant/builder@2025.09.0
|
|
|
|
|
# with:
|
|
|
|
|
# args: |
|
|
|
|
|
# $BUILD_ARGS \
|
|
|
|
|
# --target /data/machine \
|
|
|
|
|
# --cosign \
|
|
|
|
|
# --machine "${{ needs.init.outputs.version }}=${{ matrix.machine }}"
|
|
|
|
|
|
|
|
|
|
publish_ha:
|
|
|
|
|
name: Publish version files
|
|
|
|
|
environment: ${{ needs.init.outputs.channel }}
|
|
|
|
|
if: github.repository_owner == 'home-assistant'
|
|
|
|
|
needs: ["init", "build_machine"]
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout the repository
|
|
|
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
|
# publish_ha:
|
|
|
|
|
# name: Publish version files
|
|
|
|
|
# environment: ${{ needs.init.outputs.channel }}
|
|
|
|
|
# if: github.repository_owner == 'home-assistant'
|
|
|
|
|
# needs: ["init", "build_machine"]
|
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
|
# steps:
|
|
|
|
|
# - name: Checkout the repository
|
|
|
|
|
# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
|
|
|
|
|
|
- name: Initialize git
|
|
|
|
|
uses: home-assistant/actions/helpers/git-init@master
|
|
|
|
|
with:
|
|
|
|
|
name: ${{ secrets.GIT_NAME }}
|
|
|
|
|
email: ${{ secrets.GIT_EMAIL }}
|
|
|
|
|
token: ${{ secrets.GIT_TOKEN }}
|
|
|
|
|
# - name: Initialize git
|
|
|
|
|
# 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
|
|
|
|
|
uses: home-assistant/actions/helpers/version-push@master
|
|
|
|
|
with:
|
|
|
|
|
key: "homeassistant[]"
|
|
|
|
|
key-description: "Home Assistant Core"
|
|
|
|
|
version: ${{ needs.init.outputs.version }}
|
|
|
|
|
channel: ${{ needs.init.outputs.channel }}
|
|
|
|
|
exclude-list: '["odroid-xu","qemuarm","qemux86","raspberrypi","raspberrypi2","raspberrypi3","raspberrypi4","tinker"]'
|
|
|
|
|
# - name: Update version file
|
|
|
|
|
# uses: home-assistant/actions/helpers/version-push@master
|
|
|
|
|
# with:
|
|
|
|
|
# key: "homeassistant[]"
|
|
|
|
|
# key-description: "Home Assistant Core"
|
|
|
|
|
# version: ${{ needs.init.outputs.version }}
|
|
|
|
|
# channel: ${{ needs.init.outputs.channel }}
|
|
|
|
|
|
|
|
|
|
- name: Update version file (stable -> beta)
|
|
|
|
|
if: needs.init.outputs.channel == 'stable'
|
|
|
|
|
uses: home-assistant/actions/helpers/version-push@master
|
|
|
|
|
with:
|
|
|
|
|
key: "homeassistant[]"
|
|
|
|
|
key-description: "Home Assistant Core"
|
|
|
|
|
version: ${{ needs.init.outputs.version }}
|
|
|
|
|
channel: beta
|
|
|
|
|
exclude-list: '["odroid-xu","qemuarm","qemux86","raspberrypi","raspberrypi2","raspberrypi3","raspberrypi4","tinker"]'
|
|
|
|
|
# - name: Update version file (stable -> beta)
|
|
|
|
|
# if: needs.init.outputs.channel == 'stable'
|
|
|
|
|
# uses: home-assistant/actions/helpers/version-push@master
|
|
|
|
|
# with:
|
|
|
|
|
# key: "homeassistant[]"
|
|
|
|
|
# key-description: "Home Assistant Core"
|
|
|
|
|
# version: ${{ needs.init.outputs.version }}
|
|
|
|
|
# channel: beta
|
|
|
|
|
|
|
|
|
|
publish_container:
|
|
|
|
|
name: Publish meta container for ${{ matrix.registry }}
|
|
|
|
|
environment: ${{ needs.init.outputs.channel }}
|
|
|
|
|
if: github.repository_owner == 'home-assistant'
|
|
|
|
|
needs: ["init", "build_base"]
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
permissions:
|
|
|
|
|
contents: read
|
|
|
|
|
packages: write
|
|
|
|
|
id-token: write
|
|
|
|
|
strategy:
|
|
|
|
|
fail-fast: false
|
|
|
|
|
matrix:
|
|
|
|
|
registry: ["ghcr.io/home-assistant", "docker.io/homeassistant"]
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout the repository
|
|
|
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
|
# publish_container:
|
|
|
|
|
# name: Publish meta container for ${{ matrix.registry }}
|
|
|
|
|
# environment: ${{ needs.init.outputs.channel }}
|
|
|
|
|
# if: github.repository_owner == 'home-assistant'
|
|
|
|
|
# needs: ["init", "build_base"]
|
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
|
# permissions:
|
|
|
|
|
# contents: read
|
|
|
|
|
# packages: write
|
|
|
|
|
# id-token: write
|
|
|
|
|
# strategy:
|
|
|
|
|
# fail-fast: false
|
|
|
|
|
# matrix:
|
|
|
|
|
# registry: ["ghcr.io/home-assistant", "docker.io/homeassistant"]
|
|
|
|
|
# steps:
|
|
|
|
|
# - name: Checkout the repository
|
|
|
|
|
# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
|
|
|
|
|
|
- name: Install Cosign
|
|
|
|
|
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
|
|
|
|
|
with:
|
|
|
|
|
cosign-release: "v2.2.3"
|
|
|
|
|
# - name: Install Cosign
|
|
|
|
|
# uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
|
|
|
|
|
# with:
|
|
|
|
|
# cosign-release: "v2.2.3"
|
|
|
|
|
|
|
|
|
|
- name: Login to DockerHub
|
|
|
|
|
if: matrix.registry == 'docker.io/homeassistant'
|
|
|
|
|
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
|
|
|
|
with:
|
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
# - name: Login to DockerHub
|
|
|
|
|
# if: matrix.registry == 'docker.io/homeassistant'
|
|
|
|
|
# uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
|
|
|
|
# with:
|
|
|
|
|
# username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
|
# password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
|
if: matrix.registry == 'ghcr.io/home-assistant'
|
|
|
|
|
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
|
|
|
|
with:
|
|
|
|
|
registry: ghcr.io
|
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
# - name: Login to GitHub Container Registry
|
|
|
|
|
# if: matrix.registry == 'ghcr.io/home-assistant'
|
|
|
|
|
# uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
|
|
|
|
# with:
|
|
|
|
|
# registry: ghcr.io
|
|
|
|
|
# username: ${{ github.repository_owner }}
|
|
|
|
|
# password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
|
|
- name: Build Meta Image
|
|
|
|
|
shell: bash
|
|
|
|
|
run: |
|
|
|
|
|
export DOCKER_CLI_EXPERIMENTAL=enabled
|
|
|
|
|
# - name: Build Meta Image
|
|
|
|
|
# shell: bash
|
|
|
|
|
# run: |
|
|
|
|
|
# export DOCKER_CLI_EXPERIMENTAL=enabled
|
|
|
|
|
|
|
|
|
|
function create_manifest() {
|
|
|
|
|
local tag_l=${1}
|
|
|
|
|
local tag_r=${2}
|
|
|
|
|
local registry=${{ matrix.registry }}
|
|
|
|
|
# function create_manifest() {
|
|
|
|
|
# local tag_l=${1}
|
|
|
|
|
# local tag_r=${2}
|
|
|
|
|
# local registry=${{ matrix.registry }}
|
|
|
|
|
|
|
|
|
|
docker manifest create "${registry}/home-assistant:${tag_l}" \
|
|
|
|
|
"${registry}/amd64-homeassistant:${tag_r}" \
|
|
|
|
|
"${registry}/aarch64-homeassistant:${tag_r}"
|
|
|
|
|
# docker manifest create "${registry}/home-assistant:${tag_l}" \
|
|
|
|
|
# "${registry}/amd64-homeassistant:${tag_r}" \
|
|
|
|
|
# "${registry}/i386-homeassistant:${tag_r}" \
|
|
|
|
|
# "${registry}/armhf-homeassistant:${tag_r}" \
|
|
|
|
|
# "${registry}/armv7-homeassistant:${tag_r}" \
|
|
|
|
|
# "${registry}/aarch64-homeassistant:${tag_r}"
|
|
|
|
|
|
|
|
|
|
docker manifest annotate "${registry}/home-assistant:${tag_l}" \
|
|
|
|
|
"${registry}/amd64-homeassistant:${tag_r}" \
|
|
|
|
|
--os linux --arch amd64
|
|
|
|
|
# docker manifest annotate "${registry}/home-assistant:${tag_l}" \
|
|
|
|
|
# "${registry}/amd64-homeassistant:${tag_r}" \
|
|
|
|
|
# --os linux --arch amd64
|
|
|
|
|
|
|
|
|
|
docker manifest annotate "${registry}/home-assistant:${tag_l}" \
|
|
|
|
|
"${registry}/aarch64-homeassistant:${tag_r}" \
|
|
|
|
|
--os linux --arch arm64 --variant=v8
|
|
|
|
|
# docker manifest annotate "${registry}/home-assistant:${tag_l}" \
|
|
|
|
|
# "${registry}/i386-homeassistant:${tag_r}" \
|
|
|
|
|
# --os linux --arch 386
|
|
|
|
|
|
|
|
|
|
docker manifest push --purge "${registry}/home-assistant:${tag_l}"
|
|
|
|
|
cosign sign --yes "${registry}/home-assistant:${tag_l}"
|
|
|
|
|
}
|
|
|
|
|
# docker manifest annotate "${registry}/home-assistant:${tag_l}" \
|
|
|
|
|
# "${registry}/armhf-homeassistant:${tag_r}" \
|
|
|
|
|
# --os linux --arch arm --variant=v6
|
|
|
|
|
|
|
|
|
|
function validate_image() {
|
|
|
|
|
local image=${1}
|
|
|
|
|
if ! cosign verify --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp https://github.com/home-assistant/core/.* "${image}"; then
|
|
|
|
|
echo "Invalid signature!"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
# docker manifest annotate "${registry}/home-assistant:${tag_l}" \
|
|
|
|
|
# "${registry}/armv7-homeassistant:${tag_r}" \
|
|
|
|
|
# --os linux --arch arm --variant=v7
|
|
|
|
|
|
|
|
|
|
function push_dockerhub() {
|
|
|
|
|
local image=${1}
|
|
|
|
|
local tag=${2}
|
|
|
|
|
# docker manifest annotate "${registry}/home-assistant:${tag_l}" \
|
|
|
|
|
# "${registry}/aarch64-homeassistant:${tag_r}" \
|
|
|
|
|
# --os linux --arch arm64 --variant=v8
|
|
|
|
|
|
|
|
|
|
docker tag "ghcr.io/home-assistant/${image}:${tag}" "docker.io/homeassistant/${image}:${tag}"
|
|
|
|
|
docker push "docker.io/homeassistant/${image}:${tag}"
|
|
|
|
|
cosign sign --yes "docker.io/homeassistant/${image}:${tag}"
|
|
|
|
|
}
|
|
|
|
|
# docker manifest push --purge "${registry}/home-assistant:${tag_l}"
|
|
|
|
|
# cosign sign --yes "${registry}/home-assistant:${tag_l}"
|
|
|
|
|
# }
|
|
|
|
|
|
|
|
|
|
# Pull images from github container registry and verify signature
|
|
|
|
|
docker pull "ghcr.io/home-assistant/amd64-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
docker pull "ghcr.io/home-assistant/aarch64-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
# function validate_image() {
|
|
|
|
|
# local image=${1}
|
|
|
|
|
# if ! cosign verify --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp https://github.com/home-assistant/core/.* "${image}"; then
|
|
|
|
|
# echo "Invalid signature!"
|
|
|
|
|
# exit 1
|
|
|
|
|
# fi
|
|
|
|
|
# }
|
|
|
|
|
|
|
|
|
|
validate_image "ghcr.io/home-assistant/amd64-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
validate_image "ghcr.io/home-assistant/aarch64-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
# function push_dockerhub() {
|
|
|
|
|
# local image=${1}
|
|
|
|
|
# local tag=${2}
|
|
|
|
|
|
|
|
|
|
if [[ "${{ matrix.registry }}" == "docker.io/homeassistant" ]]; then
|
|
|
|
|
# Upload images to dockerhub
|
|
|
|
|
push_dockerhub "amd64-homeassistant" "${{ needs.init.outputs.version }}"
|
|
|
|
|
push_dockerhub "aarch64-homeassistant" "${{ needs.init.outputs.version }}"
|
|
|
|
|
fi
|
|
|
|
|
# docker tag "ghcr.io/home-assistant/${image}:${tag}" "docker.io/homeassistant/${image}:${tag}"
|
|
|
|
|
# docker push "docker.io/homeassistant/${image}:${tag}"
|
|
|
|
|
# cosign sign --yes "docker.io/homeassistant/${image}:${tag}"
|
|
|
|
|
# }
|
|
|
|
|
|
|
|
|
|
# Create version tag
|
|
|
|
|
create_manifest "${{ needs.init.outputs.version }}" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# # Pull images from github container registry and verify signature
|
|
|
|
|
# docker pull "ghcr.io/home-assistant/amd64-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
# docker pull "ghcr.io/home-assistant/i386-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
# docker pull "ghcr.io/home-assistant/armhf-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
# docker pull "ghcr.io/home-assistant/armv7-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
# docker pull "ghcr.io/home-assistant/aarch64-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
|
|
|
|
|
# Create general tags
|
|
|
|
|
if [[ "${{ needs.init.outputs.version }}" =~ d ]]; then
|
|
|
|
|
create_manifest "dev" "${{ needs.init.outputs.version }}"
|
|
|
|
|
elif [[ "${{ needs.init.outputs.version }}" =~ b ]]; then
|
|
|
|
|
create_manifest "beta" "${{ needs.init.outputs.version }}"
|
|
|
|
|
create_manifest "rc" "${{ needs.init.outputs.version }}"
|
|
|
|
|
else
|
|
|
|
|
create_manifest "stable" "${{ needs.init.outputs.version }}"
|
|
|
|
|
create_manifest "latest" "${{ needs.init.outputs.version }}"
|
|
|
|
|
create_manifest "beta" "${{ needs.init.outputs.version }}"
|
|
|
|
|
create_manifest "rc" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# validate_image "ghcr.io/home-assistant/amd64-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
# validate_image "ghcr.io/home-assistant/i386-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
# validate_image "ghcr.io/home-assistant/armhf-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
# validate_image "ghcr.io/home-assistant/armv7-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
# validate_image "ghcr.io/home-assistant/aarch64-homeassistant:${{ needs.init.outputs.version }}"
|
|
|
|
|
|
|
|
|
|
# Create series version tag (e.g. 2021.6)
|
|
|
|
|
v="${{ needs.init.outputs.version }}"
|
|
|
|
|
create_manifest "${v%.*}" "${{ needs.init.outputs.version }}"
|
|
|
|
|
fi
|
|
|
|
|
# if [[ "${{ matrix.registry }}" == "docker.io/homeassistant" ]]; then
|
|
|
|
|
# # Upload images to dockerhub
|
|
|
|
|
# push_dockerhub "amd64-homeassistant" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# push_dockerhub "i386-homeassistant" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# push_dockerhub "armhf-homeassistant" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# push_dockerhub "armv7-homeassistant" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# push_dockerhub "aarch64-homeassistant" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# fi
|
|
|
|
|
|
|
|
|
|
build_python:
|
|
|
|
|
name: Build PyPi package
|
|
|
|
|
environment: ${{ needs.init.outputs.channel }}
|
|
|
|
|
needs: ["init", "build_base"]
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
permissions:
|
|
|
|
|
contents: read
|
|
|
|
|
id-token: write
|
|
|
|
|
if: github.repository_owner == 'home-assistant' && needs.init.outputs.publish == 'true'
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout the repository
|
|
|
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
|
# # Create version tag
|
|
|
|
|
# create_manifest "${{ needs.init.outputs.version }}" "${{ needs.init.outputs.version }}"
|
|
|
|
|
|
|
|
|
|
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
|
|
|
|
|
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
|
|
|
|
with:
|
|
|
|
|
python-version: ${{ env.DEFAULT_PYTHON }}
|
|
|
|
|
# # Create general tags
|
|
|
|
|
# if [[ "${{ needs.init.outputs.version }}" =~ d ]]; then
|
|
|
|
|
# create_manifest "dev" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# elif [[ "${{ needs.init.outputs.version }}" =~ b ]]; then
|
|
|
|
|
# create_manifest "beta" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# create_manifest "rc" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# else
|
|
|
|
|
# create_manifest "stable" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# create_manifest "latest" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# create_manifest "beta" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# create_manifest "rc" "${{ needs.init.outputs.version }}"
|
|
|
|
|
|
|
|
|
|
- name: Download translations
|
|
|
|
|
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
|
|
|
|
with:
|
|
|
|
|
name: translations
|
|
|
|
|
# # Create series version tag (e.g. 2021.6)
|
|
|
|
|
# v="${{ needs.init.outputs.version }}"
|
|
|
|
|
# create_manifest "${v%.*}" "${{ needs.init.outputs.version }}"
|
|
|
|
|
# fi
|
|
|
|
|
|
|
|
|
|
- name: Extract translations
|
|
|
|
|
run: |
|
|
|
|
|
tar xvf translations.tar.gz
|
|
|
|
|
rm translations.tar.gz
|
|
|
|
|
# build_python:
|
|
|
|
|
# name: Build PyPi package
|
|
|
|
|
# environment: ${{ needs.init.outputs.channel }}
|
|
|
|
|
# needs: ["init", "build_base"]
|
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
|
# permissions:
|
|
|
|
|
# contents: read
|
|
|
|
|
# id-token: write
|
|
|
|
|
# if: github.repository_owner == 'home-assistant' && needs.init.outputs.publish == 'true'
|
|
|
|
|
# steps:
|
|
|
|
|
# - name: Checkout the repository
|
|
|
|
|
# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
|
|
|
|
|
|
- name: Build package
|
|
|
|
|
shell: bash
|
|
|
|
|
run: |
|
|
|
|
|
# Remove dist, build, and homeassistant.egg-info
|
|
|
|
|
# when build locally for testing!
|
|
|
|
|
pip install build
|
|
|
|
|
python -m build
|
|
|
|
|
# - name: Set up Python ${{ env.DEFAULT_PYTHON }}
|
|
|
|
|
# uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
|
|
|
|
# with:
|
|
|
|
|
# python-version: ${{ env.DEFAULT_PYTHON }}
|
|
|
|
|
|
|
|
|
|
- name: Upload package to PyPI
|
|
|
|
|
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
|
|
|
|
|
with:
|
|
|
|
|
skip-existing: true
|
|
|
|
|
# - name: Download translations
|
|
|
|
|
# uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
|
|
|
|
# with:
|
|
|
|
|
# name: translations
|
|
|
|
|
|
|
|
|
|
# - name: Extract translations
|
|
|
|
|
# run: |
|
|
|
|
|
# tar xvf translations.tar.gz
|
|
|
|
|
# rm translations.tar.gz
|
|
|
|
|
|
|
|
|
|
# - name: Build package
|
|
|
|
|
# shell: bash
|
|
|
|
|
# run: |
|
|
|
|
|
# # Remove dist, build, and homeassistant.egg-info
|
|
|
|
|
# # when build locally for testing!
|
|
|
|
|
# pip install build
|
|
|
|
|
# python -m build
|
|
|
|
|
|
|
|
|
|
# - name: Upload package to PyPI
|
|
|
|
|
# uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
|
|
|
|
|
# with:
|
|
|
|
|
# skip-existing: true
|
|
|
|
|
|
|
|
|
|
hassfest-image:
|
|
|
|
|
name: Build and test hassfest image
|
|
|
|
|
@@ -493,10 +531,10 @@ jobs:
|
|
|
|
|
push: true
|
|
|
|
|
tags: ${{ env.HASSFEST_IMAGE_TAG }},${{ env.HASSFEST_IMAGE_NAME }}:latest
|
|
|
|
|
|
|
|
|
|
- name: Generate artifact attestation
|
|
|
|
|
if: needs.init.outputs.channel != 'dev' && needs.init.outputs.publish == 'true'
|
|
|
|
|
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
|
|
|
|
|
with:
|
|
|
|
|
subject-name: ${{ env.HASSFEST_IMAGE_NAME }}
|
|
|
|
|
subject-digest: ${{ steps.push.outputs.digest }}
|
|
|
|
|
push-to-registry: true
|
|
|
|
|
# - name: Generate artifact attestation
|
|
|
|
|
# if: needs.init.outputs.channel != 'dev' && needs.init.outputs.publish == 'true'
|
|
|
|
|
# uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
|
|
|
|
|
# with:
|
|
|
|
|
# subject-name: ${{ env.HASSFEST_IMAGE_NAME }}
|
|
|
|
|
# subject-digest: ${{ steps.push.outputs.digest }}
|
|
|
|
|
# push-to-registry: true
|
|
|
|
|
|