Skip to content

Commit 34c0502

Browse files
committed
experiment with docker cache
1 parent 1c71210 commit 34c0502

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/checks.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: ctlptl create cluster kind --registry=ctlptl-registry
2323

2424
- name: Cache Helm Output
25-
id: cache-helm-ooutput
25+
id: cache-helm-output
2626
uses: actions/cache@v5
2727
with:
2828
path: .helm-cache
@@ -34,4 +34,18 @@ jobs:
3434
- name: Test Using Local Config
3535
run: tilt ci --timeout "5m"
3636

37+
- name: List images
38+
run: |
39+
registry_host=$(ctlptl get cluster kind-kind -o template --template '{{.status.localRegistryHosting.host}}')
40+
kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec['initContainers', 'containers'][*].image}" \
41+
| tr -s '[[:space:]]' '\n' \
42+
| sort \
43+
| uniq \
44+
| grep -Ev "(registry.k8s.io|docker.io|:latest|:main)" \
45+
| grep ":.*$" \
46+
| while IFS= read -r line; do
47+
docker image pull $line
48+
docker image save $line -o .image-cache/${line//\//-}.tar
49+
done
50+
docker image list
3751

0 commit comments

Comments
 (0)