mirror of
https://github.com/eko/pihole-exporter.git
synced 2024-11-21 11:05:22 +01:00
Fixed CI/CD to build arm architecture image
This commit is contained in:
parent
a124a6be35
commit
548b6edc3e
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
@ -31,7 +31,16 @@ jobs:
|
||||
repository: ekofr/pihole-exporter
|
||||
tag_with_sha: true
|
||||
tags: amd64
|
||||
build_args: OS=linux,ARCH=amd64
|
||||
build_args: OS=linux,ARCH=amd64,IMAGE=scratch
|
||||
- name: Build and Push Docker Image (Linux - ARM32)
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
repository: ekofr/pihole-exporter
|
||||
tag_with_sha: true
|
||||
tags: arm32
|
||||
build_args: OS=linux,ARCH=arm32,IMAGE=arm32v7/alpine:3.11
|
||||
- name: Build and Push Docker Image (Linux - ARM64)
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
@ -40,4 +49,4 @@ jobs:
|
||||
repository: ekofr/pihole-exporter
|
||||
tag_with_sha: true
|
||||
tags: arm64
|
||||
build_args: OS=linux,ARCH=arm64
|
||||
build_args: OS=linux,ARCH=arm64,IMAGE=arm64v8/alpine:3.11
|
||||
|
@ -2,6 +2,7 @@ FROM golang:alpine as builder
|
||||
|
||||
ARG OS=linux
|
||||
ARG ARCH=amd64
|
||||
ARG IMAGE=scratch
|
||||
|
||||
WORKDIR /go/src/github.com/eko/pihole-exporter
|
||||
COPY . .
|
||||
@ -13,7 +14,7 @@ RUN GO111MODULE=on go mod vendor
|
||||
RUN CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH go build -ldflags '-s -w' -o binary ./
|
||||
RUN upx -f --brute binary
|
||||
|
||||
FROM scratch
|
||||
FROM $IMAGE
|
||||
|
||||
LABEL name="pihole-exporter"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user