This commit is contained in:
Matt Stam 2022-03-21 14:30:14 -07:00 коммит произвёл GitHub
Родитель f7f987e0a4
Коммит 33e2999b2b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 24 добавлений и 2 удалений

2
.github/workflows/build-publish-mcr.yml поставляемый
Просмотреть файл

@ -63,7 +63,7 @@ jobs:
- name: 'Run Azure CLI commands'
run: |
az acr login -n ${{ secrets.AZURE_REGISTRY_SERVER }}
REGISTRY=${{ secrets.AZURE_REGISTRY_SERVER }}/public/aks VERSION=v${{ steps.changelog_reader.outputs.version }} make push
REGISTRY=${{ secrets.AZURE_REGISTRY_SERVER }}/public/aks VERSION=v${{ steps.changelog_reader.outputs.version }} make all-manifest
echo "ACR push done"

Просмотреть файл

@ -3,6 +3,7 @@
## [0.1.2]
* Update usage examples, README, and CHANGELOG formatting
* Add CI for multi-arch builds
## [0.1.1]

Просмотреть файл

@ -63,8 +63,11 @@ endif
ifeq ($(ARCH),ppc64le)
BASEIMAGE?=k8s.gcr.io/build-image/debian-iptables-ppc64le:buster-v1.7.0
endif
ifeq ($(ARCH),s390x)
BASEIMAGE?=k8s.gcr.io/build-image/debian-iptables-s390x:buster-v1.7.0
endif
TAG := $(VERSION)
TAG := $(VERSION)__$(OS)_$(ARCH)
BUILD_IMAGE ?= golang:1.17-alpine
@ -103,6 +106,12 @@ push-%:
GOOS=$(firstword $(subst _, ,$*)) \
GOARCH=$(lastword $(subst _, ,$*))
manifest-%:
@$(MAKE) manifest \
--no-print-directory \
GOOS=$(firstword $(subst _, ,$*)) \
GOARCH=$(lastword $(subst _, ,$*))
all-build: # @HELP builds binaries for all platforms
all-build: $(addprefix build-, $(subst /,_, $(ALL_PLATFORMS)))
@ -112,6 +121,9 @@ all-container: $(addprefix container-, $(subst /,_, $(ALL_PLATFORMS)))
all-push: # @HELP pushes containers for all platforms to the defined registry
all-push: $(addprefix push-, $(subst /,_, $(ALL_PLATFORMS)))
all-manifest: # @HELP creates a docker manifest for all platforms (for multi-arch)
all-manifest: $(addprefix manifest-, $(subst /,_, $(ALL_PLATFORMS)))
# The following structure defeats Go's (intentional) behavior to always touch
# result files, even if they have not changed. This will still run `go` but
# will not trigger further work if nothing has actually changed.
@ -242,6 +254,15 @@ push: container
done
@echo
manifest: # @HELP updates and pushes a manifest tag, which can contain multiple ($OS/$ARCH)
manifest: push
@for bin in $(BINS); do \
docker manifest create $(REGISTRY)/$$bin:$(VERSION) \
--amend "$(REGISTRY)/$$bin:$(TAG)"; \
docker manifest push $(REGISTRY)/$$bin:$(VERSION); \
done
@echo
version: # @HELP outputs the version string
version:
@echo $(VERSION)