Skip to content

Commit ebcabc5

Browse files
authored
Update build-and-push.yml
1 parent d9616d2 commit ebcabc5

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/build-and-push.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ jobs:
8585
- name: Log in to GitHub Container Registry
8686
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
8787

88-
- name: Get repository name
89-
run: |
90-
REPO_NAME="$(echo ${{ github.repository }} | awk -F/ '{ print $2 }')" >> $GITHUB_ENV
91-
echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV
92-
93-
- name: Delete Untagged images
94-
run: |
95-
untagged_images=$(gh api -X GET /user/packages/container/${{ env.REPO_NAME }}/versions --paginate --jq '.[] | select(.metadata.container.tags | length == 0) | .id')
96-
for image_id in ${untagged_images}; do
97-
echo "Deleting image with ID: ${image_id}"
98-
gh api -X DELETE /user/packages/container/${{ env.REPO_NAME }}/versions/${image_id}
99-
done
88+
# - name: Get repository name
89+
# run: |
90+
# REPO_NAME="$(echo ${{ github.repository }} | awk -F/ '{ print $2 }')" >> $GITHUB_ENV
91+
# echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV
92+
93+
# - name: Delete Untagged images
94+
# run: |
95+
# untagged_images=$(gh api -X GET /user/packages/container/${{ env.REPO_NAME }}/versions --paginate --jq '.[] | select(.metadata.container.tags | length == 0) | .id')
96+
# for image_id in ${untagged_images}; do
97+
# echo "Deleting image with ID: ${image_id}"
98+
# gh api -X DELETE /user/packages/container/${{ env.REPO_NAME }}/versions/${image_id}
99+
# done

0 commit comments

Comments
 (0)