Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(.git): delete -amd64 and -arm64 image tags after pushing manifest #5526

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/actions/combine-multi-arch-images/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ runs:
ALL_TAGS: ${{ steps.get-all-tags.outputs.tags }}
shell: bash

- name: Create Docker manifest
- name: Create Docker manifest and delete -amd64 and -arm64 tags
run: |
for base_tag in $BASE_TAGS; do
echo -e "\nbase_tag: $base_tag"
Expand Down Expand Up @@ -100,6 +100,16 @@ runs:
$arm64_image; then

docker manifest push ${{ steps.set-image-name.outputs.image-name }}:$base_tag

# Delete amd64_image and arm64_image
curl -X DELETE \
-H "Authorization: Bearer ${{ github.token }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/orgs/${{ github.repository_owner }}/packages/container/${{ inputs.package-name }}/versions/$amd64_tag
curl -X DELETE \
-H "Authorization: Bearer ${{ github.token }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/orgs/${{ github.repository_owner }}/packages/container/${{ inputs.package-name }}/versions/$arm64_tag
fi
done
env:
Expand Down
Loading