Push releases to Docker Hub for ARM64 and ARM v6/v7

This commit is contained in:
stefanprodan
2020-05-20 17:35:38 +03:00
parent f75f6e9fbc
commit 7d2bc4905a
4 changed files with 13 additions and 9 deletions
@@ -1,20 +1,21 @@
name: build
name: multi-arch-build
on:
push:
branches: '*'
tags: '*'
jobs:
build:
build-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: crazy-max/ghaction-docker-buildx@v1
- name: build
- name: buildx
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
docker buildx build --platform "linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64" \
--output "type=image,push=true" \
--build-arg "REVISION=${GITHUB_SHA::8}" \
--tag "docker.io/stefanprodan/podinfo:multiarch" \
--build-arg "REVISION=${GITHUB_SHA}" \
--tag "docker.io/stefanprodan/podinfo:${GITHUB_REF#refs/tags/}" \
--tag "docker.io/stefanprodan/podinfo:latest" \
--file Dockerfile .
+2 -2
View File
@@ -1,4 +1,4 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.14-alpine as builder
FROM golang:1.14-alpine as builder
ARG REVISION
@@ -18,7 +18,7 @@ RUN CGO_ENABLED=0 go build -ldflags "-s -w \
-X github.com/stefanprodan/podinfo/pkg/version.REVISION=${REVISION}" \
-a -o bin/podcli cmd/podcli/*
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.11
FROM alpine:3.11
RUN addgroup -S app \
&& adduser -S -g app app \
+1
View File
@@ -22,6 +22,7 @@ Specifications:
* Helm and Kustomize installers
* End-to-End testing with Kubernetes Kind and Helm
* Kustomize testing with GitHub Actions and Open Policy Agent
* Multi-arch container image with Docker buildx and Github Actions
Web API:
+3 -1
View File
@@ -2,5 +2,7 @@
set -o errexit
docker build -t test/podinfo:latest .
GIT_COMMIT=$(git rev-list -1 HEAD)
docker build -t test/podinfo:latest --build-arg "REVISION=${GIT_COMMIT}" .