-
Notifications
You must be signed in to change notification settings - Fork 107
52 lines (44 loc) · 1.24 KB
/
master.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
49
50
51
52
name: Test (master)
on:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go_version: [ '1.20' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go_version }}
- name: Install go dependencies
run: go get -t -v ./...
- name: Run go tests
run: go test -v -cover -race ./...
docker-build:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up docker buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
buildx-version: latest
qemu-version: latest
- name: Docker buildx available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Run docker buildx build
run: |
docker buildx build \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
--output=type=registry,push=true \
--tag ekofr/pihole-exporter:latest \
.