Skip to content

Commit 33215d6

Browse files
authored
feat(.git): delete -amd64 and -arm64 image tags after pushing manifest (#5526)
* not push manifest if eithor amd64 or arm64 is missing Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp> * delete -amd64 and -arm64 tags Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp> --------- Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
1 parent 503b2a0 commit 33215d6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/actions/combine-multi-arch-images/action.yaml

+11-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ runs:
6767
ALL_TAGS: ${{ steps.get-all-tags.outputs.tags }}
6868
shell: bash
6969

70-
- name: Create Docker manifest
70+
- name: Create Docker manifest and delete -amd64 and -arm64 tags
7171
run: |
7272
for base_tag in $BASE_TAGS; do
7373
echo -e "\nbase_tag: $base_tag"
@@ -100,6 +100,16 @@ runs:
100100
$arm64_image; then
101101
102102
docker manifest push ${{ steps.set-image-name.outputs.image-name }}:$base_tag
103+
104+
# Delete amd64_image and arm64_image
105+
curl -X DELETE \
106+
-H "Authorization: Bearer ${{ github.token }}" \
107+
-H "Accept: application/vnd.github.v3+json" \
108+
https://api.github.com/orgs/${{ github.repository_owner }}/packages/container/${{ inputs.package-name }}/versions/$amd64_tag
109+
curl -X DELETE \
110+
-H "Authorization: Bearer ${{ github.token }}" \
111+
-H "Accept: application/vnd.github.v3+json" \
112+
https://api.github.com/orgs/${{ github.repository_owner }}/packages/container/${{ inputs.package-name }}/versions/$arm64_tag
103113
fi
104114
done
105115
env:

0 commit comments

Comments
 (0)