a076c9d732
CD / Release (push) Successful in 11s
Reviewed-on: t.behrendt/trivy-actions#27 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>
54 lines
1.8 KiB
Markdown
54 lines
1.8 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 and Kubernetes manifests. 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
|
|
- 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. |
|