Skip to content

Commit de57405

Browse files
committed
Experimental
Signed-off-by: michaelawyu <[email protected]>
1 parent 9afe9e2 commit de57405

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

.github/workflows/build-publish-mcr.yml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,51 @@ jobs:
6767
run: |
6868
az login --identity
6969
az acr login -n aksmcrimagescommon
70-
- name: 'Pull the refresh token images from MCR'
70+
- name: 'Pull the hub agent images from ACR'
71+
# Note (chenyu1): must set the target platform explictly.
7172
run: |
72-
docker pull aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/refresh-token:${{ needs.prepare-variables.outputs.release_tag }}-amd64
73+
docker pull --platform linux/amd64 aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/hub-agent:${{ needs.prepare-variables.outputs.release_tag }}-amd64
74+
docker pull --platform linux/arm64 aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/hub-agent:${{ needs.prepare-variables.outputs.release_tag }}-arm64
75+
- name: 'Create and push multi-arch image manifests for the hub agent image'
76+
# Note (chenyu1): use `docker buildx imagetools create`, otherwise attestations cannot be perserved.
77+
run: |
78+
docker buildx imagetools create \
79+
-t aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/hub-agent:${{ needs.prepare-variables.outputs.release_tag }} \
80+
aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/hub-agent:${{ needs.prepare-variables.outputs.release_tag }}-amd64 \
81+
aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/hub-agent:${{ needs.prepare-variables.outputs.release_tag }}-arm64
82+
- name: 'Pull the member agent images from ACR'
83+
# Note (chenyu1): must set the target platform explictly.
84+
run: |
85+
docker pull --platform linux/amd64 aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/member-agent:${{ needs.prepare-variables.outputs.release_tag }}-amd64
86+
docker pull --platform linux/arm64 aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/member-agent:${{ needs.prepare-variables.outputs.release_tag }}-arm64
87+
- name: 'Create and push multi-arch image manifests for the member agent image'
88+
# Note (chenyu1): use `docker buildx imagetools create`, otherwise attestations cannot be perserved.
89+
run: |
90+
docker buildx imagetools create \
91+
-t aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/member-agent:${{ needs.prepare-variables.outputs.release_tag }} \
92+
aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/member-agent:${{ needs.prepare-variables.outputs.release_tag }}-amd64 \
93+
aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/member-agent:${{ needs.prepare-variables.outputs.release_tag }}-arm64
94+
- name: 'Pull the refresh token images from ACR'
95+
# Note (chenyu1): must set the target platform explictly.
96+
run: |
97+
docker pull --platform linux/amd64 aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/refresh-token:${{ needs.prepare-variables.outputs.release_tag }}-amd64
7398
docker pull --platform linux/arm64 aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/refresh-token:${{ needs.prepare-variables.outputs.release_tag }}-arm64
7499
- name: 'Create and push multi-arch image manifests for the refresh token image'
100+
# Note (chenyu1): use `docker buildx imagetools create`, otherwise attestations cannot be perserved.
75101
run: |
76102
docker buildx imagetools create \
77103
-t aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/refresh-token:${{ needs.prepare-variables.outputs.release_tag }} \
78104
aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/refresh-token:${{ needs.prepare-variables.outputs.release_tag }}-amd64 \
79105
aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/refresh-token:${{ needs.prepare-variables.outputs.release_tag }}-arm64
106+
- name: 'Pull the crd installer images from ACR'
107+
# Note (chenyu1): must set the target platform explictly.
108+
run: |
109+
docker pull --platform linux/amd64 aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/crd-installer:${{ needs.prepare-variables.outputs.release_tag }}-amd64
110+
docker pull --platform linux/arm64 aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/crd-installer:${{ needs.prepare-variables.outputs.release_tag }}-arm64
111+
- name: 'Create and push multi-arch image manifests for the crd installer image'
112+
# Note (chenyu1): use `docker buildx imagetools create`, otherwise attestations cannot be perserved.
113+
run: |
114+
docker buildx imagetools create \
115+
-t aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/crd-installer:${{ needs.prepare-variables.outputs.release_tag }} \
116+
aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/crd-installer:${{ needs.prepare-variables.outputs.release_tag }}-amd64 \
117+
aksmcrimagescommon.azurecr.io/${{ env.REGISTRY_REPO}}/crd-installer:${{ needs.prepare-variables.outputs.release_tag }}-arm64

0 commit comments

Comments
 (0)