feat: add get-images-from-files action
CI / Test Setup Trivy amd64 (pull_request) Successful in 11s
CI / Test Get Images From Files (pull_request) Successful in 14s
CI / Test Setup DB (pull_request) Successful in 17s
CI / Test Setup Trivy arm64 (pull_request) Successful in 41s

This commit is contained in:
2026-02-05 14:27:27 +01:00
parent cde02f6bc2
commit 923962f961
5 changed files with 147 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
# Get Images From Files Action
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.
## 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
- 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
- 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. |