Skip to content

2nd attempt at fixing Ingress #5

2nd attempt at fixing Ingress

2nd attempt at fixing Ingress #5

name: Publish HA add-on image
on:
release:
types: [published]
env:
ARCHITECTURES: '["amd64","aarch64"]'
IMAGE_NAME: home-services-logbook
permissions:
contents: read
packages: write
id-token: write
jobs:
init:
name: Prepare matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Prepare multi-arch matrix
id: matrix
uses: home-assistant/builder/actions/prepare-multi-arch-matrix@master
with:
architectures: ${{ env.ARCHITECTURES }}
image-name: ${{ env.IMAGE_NAME }}
build:
name: Build ${{ matrix.arch }}
needs: init
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.init.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Build and push arch image
uses: home-assistant/builder/actions/build-image@master
with:
arch: ${{ matrix.arch }}
image: ${{ matrix.image }}
version: ${{ github.event.release.tag_name }}
push: "true"
container-registry-password: ${{ secrets.GITHUB_TOKEN }}
image-tags: |
${{ github.event.release.tag_name }}
latest
context: .
file: ./Dockerfile
manifest:
name: Publish multi-arch manifest
needs: [init, build]
runs-on: ubuntu-latest
steps:
- name: Publish multi-arch manifest
uses: home-assistant/builder/actions/publish-multi-arch-manifest@master
with:
architectures: ${{ env.ARCHITECTURES }}
image-name: ${{ env.IMAGE_NAME }}
image-tags: |
${{ github.event.release.tag_name }}
latest
container-registry-password: ${{ secrets.GITHUB_TOKEN }}