From c79529a0d20ef96359d7a2f516c1cbf3c24a0027 Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Sat, 8 Nov 2025 18:00:31 +0100 Subject: [PATCH 1/4] chore(setup-db): change cache-dir default to runner.temp --- setup-db/action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup-db/action.yaml b/setup-db/action.yaml index 27191bc..69911f1 100644 --- a/setup-db/action.yaml +++ b/setup-db/action.yaml @@ -7,9 +7,9 @@ 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" runs: using: "composite" -- 2.52.0 From 40aa2bddc3400ad82116d9530749ace9a669845a Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Sat, 8 Nov 2025 18:00:47 +0100 Subject: [PATCH 2/4] test: remove explicit path to fall back to default --- .gitea/workflows/ci.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index aae5763..18b30ec 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -32,9 +32,5 @@ jobs: version: v0.66.0 - name: 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 ${{ runner.temp }}/trivy . -- 2.52.0 From 3a0ede95eb0b591840fff434f754645d44cb469c Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Sat, 8 Nov 2025 19:29:44 +0100 Subject: [PATCH 3/4] add cache-dir output --- setup-db/action.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup-db/action.yaml b/setup-db/action.yaml index 69911f1..d4d99ed 100644 --- a/setup-db/action.yaml +++ b/setup-db/action.yaml @@ -11,6 +11,11 @@ inputs: required: false default: "${{ runner.temp }}/trivy" +outputs: + cache-dir: + description: "Path to the Trivy cache directory" + value: ${{ inputs.cache-dir }} + runs: using: "composite" steps: -- 2.52.0 From 4d47a7465f16f7de361e33377aa4c8ed41c4fe70 Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Sat, 8 Nov 2025 19:30:09 +0100 Subject: [PATCH 4/4] change test to use cache-dir output --- .gitea/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 18b30ec..a3a4d0a 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -31,6 +31,7 @@ jobs: with: version: v0.66.0 - name: Setup DB + id: setup-db uses: ./setup-db - name: Run Trivy - run: trivy fs --skip-db-update --cache-dir ${{ runner.temp }}/trivy . + run: trivy fs --skip-db-update --cache-dir ${{ steps.setup-db.outputs.cache-dir }} . -- 2.52.0