fix(ci): replace flaky trivy-action with direct binary install
frontend-ci / lint (push) Successful in 14s
frontend-ci / typecheck (push) Successful in 13s
frontend-ci / secrets-scan (push) Successful in 4s
frontend-ci / sast (push) Successful in 9s
frontend-ci / fs-scan (push) Failing after 4s
frontend-ci / image-scan (push) Has been cancelled
frontend-ci / push (push) Has been cancelled
frontend-ci / build (push) Has been cancelled

Same pattern as the gitleaks fix: aquasecurity/trivy-action@master does
a nested actions/checkout to fetch its install script, which fails on
the Gitea runner. Switch fs-scan and image-scan to download the trivy
binary release directly and invoke it. Pinned to v0.58.1.
This commit is contained in:
2026-05-08 17:57:14 -07:00
parent 350e65cbea
commit 4e133e71a7
+13 -12
View File
@@ -58,12 +58,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: aquasecurity/trivy-action@master - name: Install and run Trivy (filesystem)
with: run: |
scan-type: fs TRIVY_VERSION=0.58.1
severity: "HIGH,CRITICAL" curl -sSL "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" \
exit-code: "1" | tar xz -C /tmp trivy
ignore-unfixed: "true" /tmp/trivy fs --severity HIGH,CRITICAL --exit-code 1 --ignore-unfixed --no-progress .
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -95,12 +95,13 @@ jobs:
tags: movieloop-frontend:ci-${{ github.sha }} tags: movieloop-frontend:ci-${{ github.sha }}
load: true load: true
cache-from: type=gha cache-from: type=gha
- uses: aquasecurity/trivy-action@master - name: Install and run Trivy (image)
with: run: |
image-ref: movieloop-frontend:ci-${{ github.sha }} TRIVY_VERSION=0.58.1
severity: "HIGH,CRITICAL" curl -sSL "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" \
exit-code: "1" | tar xz -C /tmp trivy
ignore-unfixed: "true" /tmp/trivy image --severity HIGH,CRITICAL --exit-code 1 --ignore-unfixed --no-progress \
movieloop-frontend:ci-${{ github.sha }}
push: push:
runs-on: ubuntu-latest runs-on: ubuntu-latest