forked from marciogranzotto/addon-nightscout
-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (46 loc) · 1.63 KB
/
test.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
42
43
44
45
46
47
48
name: Test Docker build
on: [pull_request]
jobs:
dockerlint:
name: Dockerfile linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: hadolint
run: docker run --rm -i hadolint/hadolint < nightscout/Dockerfile
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
build-amd64:
name: Build amd64 image
if: vars.AMD64 == 'true'
runs-on: ubuntu-latest
needs: [dockerlint, markdown-link-check]
steps:
- uses: actions/checkout@v2
- name: Patch files
uses: onlyutkarsh/[email protected]
with:
files: |
nightscout/config.json
patch-syntax: |
= /version => "${{ github.run_number }}"
- name: build amd64 image
run: docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v ~/.docker:/root/.docker -v "$(pwd)":/data homeassistant/amd64-builder -t nightscout --amd64 --test
build-aarch64:
name: Build aarch64 image
runs-on: ubuntu-latest
needs: [dockerlint, markdown-link-check]
steps:
- uses: actions/checkout@v2
- name: Patch files
uses: onlyutkarsh/[email protected]
with:
files: |
nightscout/config.json
patch-syntax: |
= /version => "${{ github.run_number }}"
- name: build aarch64 image
run: docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v ~/.docker:/root/.docker -v "$(pwd)":/data homeassistant/amd64-builder -t nightscout --aarch64 --test