diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 8553756..c5db8d2 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -3,17 +3,14 @@ name: Test (master) on: push: branches: - - '*' - pull_request: - branches: - - '*' + - master jobs: test: runs-on: ubuntu-latest strategy: matrix: - go_version: [ '1.14', '1.15', '1.16', '1.17' ] + go_version: [ '1.15', '1.16', '1.17', '1.18' ] steps: - uses: actions/checkout@v2 - uses: actions/setup-go@v1 @@ -26,3 +23,30 @@ jobs: - name: Run go tests run: go test -v -cover -race ./... + docker-build: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v2 + - 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 \ + . diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index ba3a898..4d63975 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go_version: [ '1.14', '1.15', '1.16', '1.17' ] + go_version: [ '1.15', '1.16', '1.17', '1.18' ] steps: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 @@ -102,7 +102,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: 1.18 - name: Download go dependencies run: go get -t -v ./... diff --git a/go.mod b/go.mod index 3fa713f..f9efa6e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/eko/pihole-exporter -go 1.17 +go 1.18 require ( github.com/heetch/confita v0.10.0