Files
sec-actions/setup-db/README.md
T
t.behrendt 328e630b07
CI / Test Setup Trivy amd64 (pull_request) Successful in 8s
CI / Test Setup DB (pull_request) Successful in 13s
CI / Test Setup Trivy arm64 (pull_request) Successful in 26s
fix docs
2025-11-08 19:17:09 +01:00

44 lines
1.1 KiB
Markdown

# Setup DB Action
A reusable Gitea Action that sets up the Trivy vulnerability database, restoring from cache if available.
**Note:** This action only sets up the database. Trivy itself must be installed separately (e.g., using the `setup-trivy` action).
## Usage
### Basic Usage
```yaml
- name: Setup DB
uses: https://gitea.t000-n.de/t.behrendt/trivy-actions/setup-db@0.0.1
```
### Complete Example
```yaml
name: Security Scan
on: [push, pull_request]
jobs:
security:
runs-on:
- ubuntu-latest
- linux_amd64
steps:
- uses: actions/checkout@v4
- name: Setup Trivy
uses: https://gitea.t000-n.de/t.behrendt/trivy-actions/setup-trivy@0.0.1
with:
version: "v0.66.0"
- name: Setup DB
uses: https://gitea.t000-n.de/t.behrendt/trivy-actions/setup-db@0.0.1
- name: Scan for vulnerabilities
run: trivy fs .
```
## Inputs
| Input | Description | Required | Default |
| ----------- | --------------------------------- | -------- | ---------------- |
| `cache-dir` | Path to the Trivy cache directory | No | `~/.cache/trivy` |