promote-docker-image: also accept OCI manifest formats

It seems likely that new versions of buildx are uploading manifests in
the OCI manifest format, which needs to be explicitly accepted in the
headers.

Change-Id: Ie2b908b7019389087ea37058bed15760619e48c6
This commit is contained in:
Ian Wienand
2023-01-31 09:38:50 +11:00
parent 65aa2bdc1f
commit f815383dca

View File

@@ -7,7 +7,11 @@
url: "https://registry.hub.docker.com/v2/{{ zj_image.repository }}/manifests/{{ promote_tag_prefix }}_{{ zj_image_tag }}"
status_code: 200
headers:
Accept: "application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.docker.distribution.manifest.v2+json"
Accept: >-
application/vnd.docker.distribution.manifest.list.v2+json,
application/vnd.docker.distribution.manifest.v2+json,
application/vnd.oci.image.index.v1+json,
application/vnd.oci.image.manifest.v1+json
Authorization: "Bearer {{ token.json.token }}"
return_content: true
register: manifest