Skip to content

Fix build ci

Fix build ci #21

Workflow file for this run

name: Build add-on
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
name: Build ${{ matrix.arch }} syslog add-on
strategy:
matrix:
arch: ["aarch64", "amd64", "armhf", "armv7", "i386"]
steps:
- name: Check out repository
uses: actions/checkout@v4.2.2
- name: Get information
id: info
uses: home-assistant/actions/helpers/info@master
with:
path: "./syslog"
- name: Set build arguments
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "BUILD_ARGS=--test" >> $GITHUB_ENV;
fi
- name: Login to DockerHub
if: github.event_name == 'push'
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build syslog add-on
uses: home-assistant/builder@2024.08.2
with:
args: |
${{ env.BUILD_ARGS }} \
--${{ matrix.arch }} \
--target /data/syslog \
--addon