Release Build (HA Proxy-Addon) #15
This file contains 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: Release Build (HA Proxy-Addon) | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Build HA Proxy-Addon [${{ matrix.arch }}] | |
strategy: | |
matrix: | |
arch: ["amd64"] | |
# arch: ["aarch64", "amd64", "armhf", "armv7", "i386"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Get information | |
id: info | |
uses: home-assistant/actions/helpers/info@master | |
with: | |
path: "./home-assistant-addon-proxy" | |
- name: Set Environment | |
run: | | |
echo "IMAGE=$(echo ${{ steps.info.outputs.image }} | cut -d'/' -f3)" >> $GITHUB_ENV; | |
if [[ -z "${{ github.head_ref }}" ]] && [[ "${{ github.event_name }}" == "push" ]]; then | |
echo "BUILD_ARGS=" >> $GITHUB_ENV; | |
fi | |
- name: Login to GitHub Container Registry | |
if: env.BUILD_ARGS != '--test' | |
uses: docker/login-action@v3.3.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Build+Push add-on | |
uses: home-assistant/builder@2024.08.2 | |
with: | |
args: | | |
${{ env.BUILD_ARGS }} \ | |
--${{ matrix.arch }} \ | |
--target /data/home-assistant-addon-proxy \ | |
--image "${{ env.IMAGE }}" \ | |
--docker-hub "ghcr.io/${{ github.repository_owner }}" \ | |
--addon |