-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.04 KB
/
ci.yml
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
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
variables:
runs-on: ubuntu-latest
outputs:
ADDON_LIST: ${{ env.ADDON_LIST }}
steps:
- uses: actions/checkout@v4
- name: "ARGS: valetudo-proxy" # Build of addon proxy version
run: |
echo "ADDON_LIST=['valetudo-proxy']" >> $GITHUB_ENV
build:
runs-on: ubuntu-latest
needs: variables
permissions:
packages: write
strategy:
matrix:
addon: ${{fromJSON(needs.variables.outputs.ADDON_LIST)}}
steps:
- uses: actions/checkout@v4
- name: Docker login
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login -u ${{ github.repository_owner }} --password-stdin ghcr.io
- name: Build
run: |
docker run --rm --privileged \
-v /home/runner/.docker:/root/.docker \
-v /run/docker.sock:/run/docker.sock:rw \
-v $(pwd)/${{ matrix.addon }}:/data homeassistant/amd64-builder --all -t /data \
--no-cache --docker-hub ghcr.io/${{ github.repository_owner }}