Skip to content

chore(main): release 1.4.2 #219

chore(main): release 1.4.2

chore(main): release 1.4.2 #219

Workflow file for this run

name: Builder
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: Build ${{ matrix.arch }} ${{ matrix.addon }} add-on
strategy:
fail-fast: false
matrix:
addon: ["jellyfin-server"]
arch:
- aarch64
- armv7
- amd64
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
else
echo "${{ matrix.arch }} is not a valid arch for ${{ matrix.addon }}, skipping build"
echo "build_arch=false" >>$GITHUB_OUTPUT
fi
BUILD_ARGS=""
if ${{ !startsWith(github.ref, 'refs/tags/v') }}; then
BUILD_ARGS+=" --no-latest --version unstable-${GITHUB_REF_NAME//[\/]/-}"
if ${{ github.ref != 'refs/heads/main' }}; then
BUILD_ARGS+=" --test"
fi
fi
echo "build_args=$BUILD_ARGS" >>$GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/builder@2024.08.2
with:
args: |
${{ steps.check.outputs.build_args }} \
--${{ matrix.arch }} \
--target /data/${{ matrix.addon }} \
--image "${{ steps.check.outputs.image }}" \
--docker-hub "ghcr.io/${{ github.repository_owner }}" \
--addon