Skip to content

Release Build (HA Proxy-Addon) #1

Release Build (HA Proxy-Addon)

Release Build (HA Proxy-Addon) #1

Workflow file for this run

---
name: Release Build (Proxy)
on:
workflow_dispatch:
inputs:
type:
description: 'Type (edge/proxy)'
default: 'proxy'
required: true
jobs:
build:
runs-on: ubuntu-latest
name: Build Proxy HA-addon [${{ matrix.arch }}]
strategy:
matrix:
addon: ["home-assistant-addon-proxy"]
arch: ["aarch64"]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Get information
id: info
uses: home-assistant/actions/helpers/info@master
with:
path: "./${{ matrix.addon }}"
- name: Check if add-on should be built
id: check
run: |
if [[ "${{ steps.info.outputs.architectures }}" =~ ${{ matrix.arch }} ]]; then
echo "build_arch=true" >> $GITHUB_OUTPUT;
echo "image=$(echo ${{ steps.info.outputs.image }} | cut -d'/' -f3)" >> $GITHUB_OUTPUT;
if [[ -z "${{ github.head_ref }}" ]] && [[ "${{ github.event_name }}" == "push" ]]; then
echo "BUILD_ARGS=" >> $GITHUB_ENV;
fi
else
echo "${{ matrix.arch }} is not a valid arch for ${{ matrix.addon }}, skipping build";
echo "build_arch=false" >> $GITHUB_OUTPUT;
fi
- name: Login to GitHub Container Registry
if: env.BUILD_ARGS != '--test'
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/[email protected]
with:
args: |
${{ env.BUILD_ARGS }} \
--test \
--all \
--target /data/${{ matrix.addon }} \
--image "${{ steps.check.outputs.image }}" \
--docker-hub "ghcr.io/${{ github.repository_owner }}" \
--addon