Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 0d1bb42

Browse files
authored
Merge pull request #65 from gianarb/feature/release-update-mutiarch
this PR uses buildx to update manifest for the new release
2 parents 56f28a7 + 42d15fe commit 0d1bb42

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

.github/workflows/release.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
uses: actions/checkout@v2
1616
- name: "Unshallow (required by goreleaser)"
1717
run: git fetch --prune --unshallow
18+
- name: Get the version
19+
run: echo ::set-env name=VERSION::${GITHUB_REF/refs\/tags\//}
1820
- uses: azure/docker-login@v1
1921
with:
2022
username: ${{ secrets.DOCKER_USERNAME }}
@@ -27,14 +29,21 @@ jobs:
2729
uses: imranismail/setup-kustomize@v1
2830
with:
2931
kustomize-version: "3.5.4"
30-
- name: manifest-debug
31-
run: make manifest
32-
- name: find-debug
33-
run: find ./out
32+
- name: Set up Docker Buildx
33+
uses: crazy-max/ghaction-docker-buildx@v1
34+
with:
35+
buildx-version: latest
36+
qemu-version: latest
3437
- name: Run GoReleaser
3538
uses: goreleaser/goreleaser-action@v2.0.2
3639
with:
3740
version: latest
3841
args: release --rm-dist --debug
3942
env:
4043
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
- name: Update docker manifest
45+
run: |
46+
buildx imagetools create \
47+
-t packethost/cluster-api-provider-packet:$VERSION \
48+
packethost/cluster-api-provider-packet:$VERSION-amd64 \
49+
packethost/cluster-api-provider-packet:$VERSION-arm64

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
.PHONY: vendor test manager clusterctl run install deploy manifests generate fmt vet run kubebuilder ci cd
22

3-
GIT_VERSION?=$(shell git log -1 --format="%h")
4-
RELEASE_TAG ?= $(shell git tag --points-at HEAD)
3+
GIT_VERSION ?= $(shell git log -1 --format="%h")
4+
RELEASE_TAG := $(shell git describe --abbrev=0 --tags ${TAG_COMMIT} 2>/dev/null || true)
5+
6+
ifneq ($(shell git status --porcelain),)
7+
# next is used by GoReleaser as well when --spanshot is set
8+
RELEASE_TAG := $(RELEASE_TAG)-next
9+
endif
10+
511
KUBEBUILDER_VERSION ?= 2.3.1
612
# default install location for kubebuilder; can be placed elsewhere
713
KUBEBUILDER_DIR ?= /usr/local/kubebuilder

0 commit comments

Comments
 (0)