Files
sec-actions/get-images-from-files/README.md
T
t.behrendt 2269b09740
CD / Release (push) Successful in 5s
docs(get-images-from-files): document compose support (#28)
get-images-from-files already supports compose files. This PR explicitly documents the compatibility and includes a test.

Reviewed-on: t.behrendt/trivy-actions#28
Reviewed-by: branch-buddy <branch-buddy@t00n.de>
Co-authored-by: t.behrendt <t.behrendt@t00n.de>
Co-committed-by: t.behrendt <t.behrendt@t00n.de>
2026-02-05 15:29:37 +01:00

56 lines
1.9 KiB
Markdown

# Get Images From Files Action
A reusable Gitea Action, that extracts docker images from selected files in a repository.
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.
## Usage
### Basic Usage
```yaml
- name: Get Images From Files
uses: https://gitea.t000-n.de/t.behrendt/trivy-actions/get-images-from-files@0.0.1
with:
files: |
- Dockerfile
- k8s/50_deployment.yaml
- dockers/compose.yaml
- values/traefik.yaml
```
### Complete Example
```yaml
name: Get Images From Files
on: [push, pull_request]
jobs:
get-images-from-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Images From Files
uses: https://gitea.t000-n.de/t.behrendt/trivy-actions/get-images-from-files@0.0.1
with:
files: |
- Dockerfile
- k8s/50_deployment.yaml
- dockers/compose.yaml
- values/traefik.yaml
```
## Inputs
| Input | Description | Required | Default |
| --------- | ----------------------------------------- | -------- | -------- |
| `files` | Files to extract images from. Multiple files can be specified.. | Yes | |
## Outputs
| Output | Description |
| --------- | ----------------------------------------- |
| `images` | Comma separated list of extracted image references. 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. |