Skip to content

Commit fea807b

Browse files
committed
rebuild all
1 parent 61ad58f commit fea807b

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.github/workflows/prune-all.yml renamed to .github/workflows/prune-all.yml.disabled

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Prune old GHCR images"
1+
name: "Prune all GHCR image versions"
22

33
on:
44
push:
@@ -24,7 +24,7 @@ jobs:
2424
sudo apt-get update
2525
sudo apt-get install -y gh
2626

27-
- name: Delete all but the newest version for CPU & GPU images
27+
- name: Delete **all** versions of CPU & GPU images
2828
env:
2929
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3030
OWNER: ${{ github.repository_owner }}
@@ -34,24 +34,25 @@ jobs:
3434
for IMAGE in deep-learning-crash-course deep-learning-crash-course-gpu; do
3535
echo
3636
echo "🔍 Processing package: $OWNER/$IMAGE"
37+
38+
# Fetch all versions (paginated)
3739
versions=$(gh api --paginate \
3840
-H "Accept: application/vnd.github.v3+json" \
3941
/orgs/$OWNER/packages/container/$IMAGE/versions)
4042

41-
# delete every version except the newest
42-
echo "$versions" | jq -c '.[]' | while read version; do
43-
id=$(echo "$version" | jq -r '.id')
43+
# Delete every version ID
44+
echo "$versions" | jq -r '.[].id' | while read id; do
4445
echo "→ Deleting version $id of $IMAGE"
4546
for attempt in 1 2 3; do
46-
if gh api -X DELETE \
47-
-H "Accept: application/vnd.github.v3+json" \
48-
/orgs/$OWNER/packages/container/$IMAGE/versions/$id; then
47+
if gh api -X DELETE \
48+
-H "Accept: application/vnd.github.v3+json" \
49+
/orgs/$OWNER/packages/container/$IMAGE/versions/$id; then
4950
echo " ✅ Deleted $id"
5051
break
51-
else
52+
else
5253
echo " ⚠️ Attempt $attempt failed, retrying in $((5*attempt))s…"
5354
sleep $((5*attempt))
54-
fi
55+
fi
5556
done
5657
done
57-
done
58+
done

docker/.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"jsdelivr.com",
66
"unpkg.com"
77
],
8-
98
// Make sure VS Code always uses the container’s Python
109
"python.defaultInterpreterPath": "/opt/conda/bin/python"
1110
}

0 commit comments

Comments
 (0)