diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index aae5763..a3a4d0a 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -31,10 +31,7 @@ jobs: with: version: v0.66.0 - name: Setup DB + id: setup-db uses: ./setup-db - with: - cache-dir: ${{ runner.temp }}/trivy - name: Run Trivy - env: - TRIVY_CACHE_DIR: ${{ runner.temp }}/trivy - run: trivy fs --skip-db-update . + run: trivy fs --skip-db-update --cache-dir ${{ steps.setup-db.outputs.cache-dir }} . diff --git a/setup-db/action.yaml b/setup-db/action.yaml index 27191bc..d4d99ed 100644 --- a/setup-db/action.yaml +++ b/setup-db/action.yaml @@ -7,9 +7,14 @@ branding: inputs: cache-dir: - description: "Path to the Trivy cache directory (default: ~/.cache/trivy)" + description: "Path to the Trivy cache directory (default: ${{runner.temp}}/trivy)" required: false - default: "~/.cache/trivy" + default: "${{ runner.temp }}/trivy" + +outputs: + cache-dir: + description: "Path to the Trivy cache directory" + value: ${{ inputs.cache-dir }} runs: using: "composite"