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

Commit 812825a

Browse files
authored
Merge pull request #70 from gianarb/fix/scope-unauthorized
buildx unauthorized
2 parents cba3539 + ed7672e commit 812825a

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

.github/workflows/release.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ jobs:
1717
run: git fetch --prune --unshallow
1818
- name: Get the version
1919
run: echo ::set-env name=VERSION::${GITHUB_REF/refs\/tags\//}
20-
- uses: azure/docker-login@v1
21-
with:
22-
username: ${{ secrets.DOCKER_USERNAME }}
23-
password: ${{ secrets.DOCKER_PASSWORD }}
20+
- name: docker login
21+
env:
22+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
23+
run: |
24+
echo "${DOCKER_PASSWORD}" | docker login --username "${{ secret.docker_username }}" --password-stdin docker.io
2425
- name: Set up Go
2526
uses: actions/setup-go@v2
2627
with:
@@ -41,9 +42,3 @@ jobs:
4142
args: release --rm-dist --debug
4243
env:
4344
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
- name: Update docker manifest
45-
run: |
46-
docker 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

scripts/multi_arch_docker_release.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
#!/bin/sh
22
set -e
33

4+
# This has to be set otherwise the default driver will not work
45
docker buildx create --use --name build --node build --driver-opt network=host
6+
57
docker buildx build --push --platform linux/${ARCH} \
68
-t packethost/cluster-api-provider-packet:latest-${ARCH} \
79
-t packethost/cluster-api-provider-packet:${TAG}-${ARCH} \
810
-f ../../Dockerfile.goreleaser .
911

12+
# Update the manifest for the new release
13+
docker buildx imagetools create \
14+
-t packethost/cluster-api-provider-packet:${TAG} \
15+
packethost/cluster-api-provider-packet:${TAG}-${ARCH} \
16+
packethost/cluster-api-provider-packet:${TAG}-${ARCH}
17+
18+
docker buildx imagetools create \
19+
-t packethost/cluster-api-provider-packet:latest \
20+
packethost/cluster-api-provider-packet:latest-${ARCH} \
21+
packethost/cluster-api-provider-packet:latest-${ARCH}

0 commit comments

Comments
 (0)