docs(get-images-from-files): document compose support #28
@@ -44,6 +44,7 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
- get-images-from-files/test.Dockerfile
|
- get-images-from-files/test.Dockerfile
|
||||||
- get-images-from-files/test-deployment.yaml
|
- get-images-from-files/test-deployment.yaml
|
||||||
|
- get-images-from-files/test-compose.yaml
|
||||||
- name: Check image formats extracted
|
- name: Check image formats extracted
|
||||||
run: |
|
run: |
|
||||||
images="${{ steps.giff.outputs.images }}"
|
images="${{ steps.giff.outputs.images }}"
|
||||||
@@ -59,6 +60,10 @@ jobs:
|
|||||||
check "K8s registry+tag (app:v2)" "example.com/library/app:v2"
|
check "K8s registry+tag (app:v2)" "example.com/library/app:v2"
|
||||||
check "K8s registry+digest (helper@sha256:...)" "example.com/myproject/helper@sha256:bbbbbbbb"
|
check "K8s registry+digest (helper@sha256:...)" "example.com/myproject/helper@sha256:bbbbbbbb"
|
||||||
|
|
||||||
|
# Compose-only refs
|
||||||
|
check "Compose registry+tag (web:v3)" "example.com/compose/web:v3"
|
||||||
|
check "Compose registry+tag (worker:v3)" "example.com/compose/worker:v3"
|
||||||
|
|
||||||
# Shared ref (in both files) — must appear exactly once
|
# Shared ref (in both files) — must appear exactly once
|
||||||
check "Shared ref present (distroless/static:nonroot)" "example.com/distroless/static:nonroot"
|
check "Shared ref present (distroless/static:nonroot)" "example.com/distroless/static:nonroot"
|
||||||
count=$(echo "$images" | tr ',' '\n' | grep -c 'example.com/distroless/static:nonroot' || true)
|
count=$(echo "$images" | tr ',' '\n' | grep -c 'example.com/distroless/static:nonroot' || true)
|
||||||
@@ -66,7 +71,7 @@ jobs:
|
|||||||
[ "$count" -eq 1 ] && echo "OK (count=$count)" || { echo "FAIL (count=$count, expected 1)"; exit 1; }
|
[ "$count" -eq 1 ] && echo "OK (count=$count)" || { echo "FAIL (count=$count, expected 1)"; exit 1; }
|
||||||
total=$(echo "$images" | tr ',' '\n' | grep -c . || true)
|
total=$(echo "$images" | tr ',' '\n' | grep -c . || true)
|
||||||
echo -n " Total unique refs: "
|
echo -n " Total unique refs: "
|
||||||
[ "$total" -eq 5 ] && echo "OK ($total)" || { echo "FAIL (got $total, expected 5)"; exit 1; }
|
[ "$total" -eq 7 ] && echo "OK ($total)" || { echo "FAIL (got $total, expected 7)"; exit 1; }
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "All checks passed."
|
echo "All checks passed."
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Used by CI to test get-images-from-files action (Docker Compose, registry refs only)
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
image: example.com/compose/web:v3
|
||||||
|
worker:
|
||||||
|
image: example.com/compose/worker:v3
|
||||||
Reference in New Issue
Block a user