Skip to content

Commit

Permalink
fix: workflow build docker image
Browse files Browse the repository at this point in the history
Signed-off-by: MicroOps <[email protected]>
  • Loading branch information
MicroOps-cn committed Oct 30, 2024
1 parent fa1b10a commit 349cc8e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/github-actions-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,16 +185,16 @@ jobs:
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
- name: Delete Template Image
working-directory: /tmp/digests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ls * | while read VERSION_ID;
do
echo "Delete image: ${REGISTRY}/${IMAGE_NAME}@sha256:${VERSION_ID}"
curl -X DELETE \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/user/packages/container/${PACKAGE_NAME}/versions/${VERSION_ID}
done
# - name: Delete Template Image
# working-directory: /tmp/digests
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# ls * | while read VERSION_ID;
# do
# echo "Delete image: ${REGISTRY}/${IMAGE_NAME}@sha256:${VERSION_ID}"
# curl -X DELETE \
# -H "Authorization: Bearer ${GITHUB_TOKEN}" \
# -H "Accept: application/vnd.github+json" \
# https://api.github.com/user/packages/container/${PACKAGE_NAME}/versions/${VERSION_ID}
# done

0 comments on commit 349cc8e

Please sign in to comment.