Updated to go 1.18 and added master branch latest docker tag
This commit is contained in:
parent
3d7368bd1d
commit
85925c87ab
3 changed files with 32 additions and 8 deletions
34
.github/workflows/master.yml
vendored
34
.github/workflows/master.yml
vendored
|
@ -3,17 +3,14 @@ name: Test (master)
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '*'
|
- master
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go_version: [ '1.14', '1.15', '1.16', '1.17' ]
|
go_version: [ '1.15', '1.16', '1.17', '1.18' ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-go@v1
|
- uses: actions/setup-go@v1
|
||||||
|
@ -26,3 +23,30 @@ jobs:
|
||||||
- name: Run go tests
|
- name: Run go tests
|
||||||
run: go test -v -cover -race ./...
|
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 \
|
||||||
|
.
|
||||||
|
|
4
.github/workflows/tag.yml
vendored
4
.github/workflows/tag.yml
vendored
|
@ -10,7 +10,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go_version: [ '1.14', '1.15', '1.16', '1.17' ]
|
go_version: [ '1.15', '1.16', '1.17', '1.18' ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
|
@ -102,7 +102,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17
|
go-version: 1.18
|
||||||
|
|
||||||
- name: Download go dependencies
|
- name: Download go dependencies
|
||||||
run: go get -t -v ./...
|
run: go get -t -v ./...
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,6 +1,6 @@
|
||||||
module github.com/eko/pihole-exporter
|
module github.com/eko/pihole-exporter
|
||||||
|
|
||||||
go 1.17
|
go 1.18
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/heetch/confita v0.10.0
|
github.com/heetch/confita v0.10.0
|
||||||
|
|
Loading…
Reference in a new issue