Skip to content

2026.02.2.rc1

2026.02.2.rc1 #118

Workflow file for this run

name: Build and publish
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
name: Build ${{ matrix.arch }} ${{ matrix.release }} release
strategy:
matrix:
release: [ "stable", "testing" ]
arch: [ "aarch64", "amd64"]
permissions:
contents: read
packages: write
steps:
# this will always checkout the triggered release tag
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get version to build
run: |
if [[ ${{ matrix.release }} == "stable" ]]; then
VERSION=$(grep 'version: ' dao/config.yaml | sed -e 's/^version: //')
else
VERSION=$(grep 'version: ' ./release-testing/config.yaml | sed -e 's/^version: //')
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Set stable or testing on release
if: ${{ github.ref_name == env.VERSION }}
shell: bash
run: |
if [[ ${{ matrix.release }} == "stable" ]]; then
echo "this is a final release, setting stable tag"
echo "NO_LATEST=" >> $GITHUB_ENV;
echo "EXTRA_TAG=--additional-tag stable" >> $GITHUB_ENV
echo "TARGET=--target dao" >> $GITHUB_ENV
else
echo "this is a release candidate, not setting stable or latest tag"
echo "NO_LATEST=--no-latest" >> $GITHUB_ENV;
echo "EXTRA_TAG=--additional-tag testing" >> $GITHUB_ENV;
echo "TARGET=--target release-testing" >> $GITHUB_ENV
fi
- name: Login to GHCR
if: ${{ github.ref_name == env.VERSION }}
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
- name: Prepare ${{ matrix.release }} build
if: ${{ github.ref_name == env.VERSION }}
run: |
if [[ ${{ matrix.release }} == "testing" ]]; then
cp -a dao/* ./release-${{ matrix.release }}
fi
- name: Build and publish ${{ matrix.release }} dao-image
if: ${{ github.ref_name == env.VERSION }}
uses: home-assistant/builder@2025.11.0
with:
args: |
--generic $VERSION \
--${{ matrix.arch }} \
--image "dao-${{ matrix.arch }}" \
${{ env.TARGET }} \
--version $VERSION \
--docker-hub ghcr.io/${{ github.repository_owner }} \
${{ env.NO_LATEST }} \
${{ env.EXTRA_TAG }} \
--addon