Add .gitea/workflows/*.yaml
This commit is contained in:
@@ -103,18 +103,14 @@ jobs:
|
||||
with:
|
||||
name: image
|
||||
path: /tmp
|
||||
- name: Scan saved image tar with Trivy via Docker
|
||||
- name: Load image
|
||||
run: docker load --input /tmp/image.tar
|
||||
- name: Scan loaded image
|
||||
run: |
|
||||
pwd
|
||||
ls -la /tmp || true
|
||||
docker run --rm \
|
||||
-v /tmp:/tmp \
|
||||
aquasec/trivy:0.52.2 image \
|
||||
--input /tmp/image.tar \
|
||||
--format json \
|
||||
--output /tmp/trivy-results.json \
|
||||
--severity CRITICAL,HIGH \
|
||||
--ignore-unfixed
|
||||
IMAGE="${{ inputs.image-name }}:${{ inputs.image-tag }}"
|
||||
docker run --rm aquasec/trivy:0.52.2 image \
|
||||
--format json --severity CRITICAL,HIGH --ignore-unfixed \
|
||||
"$IMAGE" > /tmp/trivy-results.json
|
||||
- name: Upload results
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user