Skip to content

Fix tag regex to trigger job #23

Fix tag regex to trigger job

Fix tag regex to trigger job #23

Workflow file for this run

name: Alpha Builder
env:
BUILD_ARGS: "--test"
MONITORED_FILES: "build.yaml config.yaml Dockerfile rootfs addon_web_ui"
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
name: Build ${{ matrix.arch }} ${{ matrix.addon }} add-on
strategy:
matrix:
addon: ["meross_local_broker"]
arch: ["aarch64", "amd64", "armhf", "armv7", "i386"]
steps:
- name: Check out repository
uses: actions/[email protected]
- name: Get information
id: info
uses: home-assistant/actions/helpers/info@master
with:
path: "./${{ matrix.addon }}"
- 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.GITHUB_TOKEN }}
- name: Setup Node
id: setup_node
uses: actions/setup-node@v1
with:
node-version: 12
- name: npm install and npm run build
working-directory: meross_local_broker/addon_web_ui
run: |
npm i
npm run-script build
- name: Extract version
id: set_version
working-directory: meross_local_broker
run: |
version="$(yq '.version' 'config.yaml').${{ github.run_attempt }}"
echo "{dev_version}={$version}" >> "$GITHUB_OUTPUT"
echo "::debug::Version set to $version"
- name: Build ${{ matrix.addon }} add-on
uses: home-assistant/[email protected]
with:
args: |
${{ env.BUILD_ARGS }} \
--${{ matrix.arch }} \
--target /data/${{ matrix.addon }} \
--image "{arch}-meross_local_broker" \
--docker-hub "ghcr.io/${{ github.repository_owner }}" \
--version "${{steps.set_version.outputs.dev_version}}" \
--no-latest \
--addon