mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-23 14:36:48 +00:00
* Fix: update actions to solve 「 deprecated 」warnings Signed-off-by: basefas <basefas@hotmail.com> * fix: update action & delete unused parameter Signed-off-by: basefas <basefas@hotmail.com> Signed-off-by: basefas <basefas@hotmail.com>
30 lines
838 B
YAML
30 lines
838 B
YAML
name: "Trivy Scan"
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
images:
|
|
name: Image Scan
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Build Vela Core image from Dockerfile
|
|
run: |
|
|
docker build --build-arg GOPROXY=https://proxy.golang.org -t docker.io/oamdev/vela-core:${{ github.sha }} .
|
|
|
|
- name: Run Trivy vulnerability scanner for vela core
|
|
uses: aquasecurity/trivy-action@master
|
|
with:
|
|
image-ref: 'docker.io/oamdev/vela-core:${{ github.sha }}'
|
|
format: 'sarif'
|
|
output: 'trivy-results.sarif'
|
|
|
|
- name: Upload Trivy scan results to GitHub Security tab
|
|
uses: github/codeql-action/upload-sarif@v2
|
|
if: always()
|
|
with:
|
|
sarif_file: 'trivy-results.sarif' |