Skip to content

Commit 4a056df

Browse files
committed
update
1 parent 9c0eab0 commit 4a056df

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

.github/workflows/docker-build.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -50,34 +50,3 @@ jobs:
5050
platforms: linux/amd64,linux/arm64
5151
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache
5252
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache,mode=max
53-
54-
cleanup:
55-
needs: build-and-push
56-
runs-on: ubuntu-latest
57-
steps:
58-
- name: Checkout repo
59-
uses: actions/checkout@v3
60-
61-
- name: Install jq
62-
run: sudo apt-get update && sudo apt-get install -y jq
63-
64-
- name: Cleanup untagged versions
65-
env:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67-
OWNER: ${{ github.repository_owner }}
68-
PACKAGE: synpage
69-
ORG_PAT: ${{ secrets.ORG_PAT }}
70-
run: |
71-
echo "$ORG_PAT" | gh auth login --with-token
72-
73-
# タグなしバージョンIDを取得
74-
VERSIONS=$(gh api -H "Accept: application/vnd.github+json" \
75-
"/users/${OWNER}/packages/container/${PACKAGE}/versions" \
76-
--paginate | jq '.[] | select(.metadata.container.tags | length == 0) | .id')
77-
78-
# 削除処理
79-
for VERSION_ID in ${VERSIONS}; do
80-
echo "Deleting version ID: ${VERSION_ID}"
81-
gh api -X DELETE -H "Accept: application/vnd.github+json" \
82-
"/users/${OWNER}/packages/container/${PACKAGE}/versions/${VERSION_ID}"
83-
done

0 commit comments

Comments
 (0)