docs: document compose compatibility
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
A reusable Gitea Action, that extracts docker images from selected files in a repository.
|
||||
|
||||
The action supports Dockerfiles and Kubernetes manifests. Other files are supported if they have a recognizable image reference. Duplicate image references are deduplicated.
|
||||
The action supports Dockerfiles, Kubernetes manifests, and Docker Compose/compose files. Other files are supported if they have a recognizable image reference. Duplicate image references are deduplicated.
|
||||
|
||||
**Note:** Only fully-qualified refs (with registry, e.g. `docker.io/library/alpine:latest`, `gcr.io/distroless/static:nonroot@sha256:...`) are included; short refs like `alpine:latest` are omitted as their use is discouraged.
|
||||
|
||||
@@ -17,6 +17,7 @@ The action supports Dockerfiles and Kubernetes manifests. Other files are suppor
|
||||
files: |
|
||||
- Dockerfile
|
||||
- k8s/50_deployment.yaml
|
||||
- dockers/compose.yaml
|
||||
- values/traefik.yaml
|
||||
```
|
||||
|
||||
@@ -37,6 +38,7 @@ jobs:
|
||||
files: |
|
||||
- Dockerfile
|
||||
- k8s/50_deployment.yaml
|
||||
- dockers/compose.yaml
|
||||
- values/traefik.yaml
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: "Get Images From Files"
|
||||
description: "Extract docker images from selected files (Dockerfiles, Kubernetes manifests, and files with recognizable image references)"
|
||||
description: "Extract docker images from selected files (Dockerfiles, Kubernetes manifests, Docker Compose/compose files, and files with recognizable image references)"
|
||||
author: "Timo Behrendt <t.behrendt@t00n.de>"
|
||||
branding:
|
||||
icon: "package"
|
||||
@@ -30,7 +30,7 @@ runs:
|
||||
[ -f "$f" ] || continue
|
||||
# Dockerfile: FROM [--platform=...] <image>
|
||||
awk '/^[[:space:]]*FROM[[:space:]]/ { print $NF }' "$f" 2>/dev/null || true
|
||||
# Kubernetes / Compose: image: <ref>
|
||||
# Kubernetes / Docker Compose: image: <ref>
|
||||
grep -E '[[:space:]]image:[[:space:]]' "$f" 2>/dev/null | sed 's/.*image:[[:space:]]*//' | awk '{ print $1 }' || true
|
||||
done | grep -E '/' | sort -u | paste -sd,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user