forked from DRSchlaubi/ha-meross-local-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.55 KB
/
builder.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Builder
env:
BUILD_ARGS: ""
MONITORED_FILES: "build.yaml config.yaml Dockerfile rootfs addon_web_ui"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: Build ${{ matrix.arch }} ${{ matrix.addon }} add-on
strategy:
matrix:
addon: ["meross_local_broker"]
arch: ["aarch64", "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: Login to GitHub Container Registry
if: env.BUILD_ARGS != '--test'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node
id: setup_node
uses: actions/setup-node@v4
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: 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 }}" \
--addon