1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

CHORE: Fix Docker Hub from the Circle CI workflow. (#1681)

This commit is contained in:
Jeffrey Cafferata
2022-08-11 15:00:19 +02:00
committed by GitHub
parent ef5da756d6
commit 4990170663

View File

@ -11,6 +11,40 @@ parameters:
description: Go Version to use
jobs:
build-docker-image:
docker:
- image: jdrouet/docker-with-buildx:stable
environment:
DOCKER_IMAGE_NAME: stackexchange/dnscontrol
DOCKER_IMAGE_VERSION: 3.18.1
DOCKER_IMAGE_PLATFORM: linux/amd64,linux/386,linux/ppc64le,linux/s390x
steps:
- checkout
- setup_remote_docker:
version: 20.10.14 # https://circleci.com/docs/building-docker-images#docker-version
docker_layer_caching: true
- run:
name: Docker login
command: |
docker login \
--username "$DOCKERHUB_USERNAME" \
--password "$DOCKERHUB_ACCESS_TOKEN"
- deploy:
name: Build multi-arch Docker images and push to Docker Hub
command: |
export DOCKER_CLI_EXPERIMENTAL=enabled
docker context create multi-arch-build
docker buildx create \
--use multi-arch-build \
--platform $DOCKER_IMAGE_PLATFORM
docker buildx build \
--push \
--platform $DOCKER_IMAGE_PLATFORM \
--tag $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_VERSION .
build:
docker:
@ -166,3 +200,6 @@ workflows:
only: [main, master]
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
- build-docker-image:
context: DNSControl