Skip to content

Commit

Permalink
try template
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianhao-Gu committed Aug 21, 2024
1 parent 6087bf9 commit 5a92fc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ jobs:
secrets: inherit
trivy-scans:
if: (github.base_ref == 'develop' || github.base_ref == 'main' || github.base_ref == 'master' ) && github.event.pull_request.merged == false
uses: kbase/.github/.github/workflows/reusable_trivy-scans.yml@main
uses: ./.github/workflows/trivy.yml
secrets: inherit
15 changes: 3 additions & 12 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
name: "Trivy Scans"

on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
# run workflow when merging to main or develop
branches:
- main
- master
- develop
workflow_call:

jobs:
build:
Expand All @@ -31,6 +20,7 @@ jobs:
git config --global --add safe.directory $GITHUB_WORKSPACE;
docker build -t trivy-test .
# Copied from https://github.com/kbase/.github/blob/main/.github/workflows/reusable_trivy-scans.yml
- name: Check for log4j CVEs
run: |
set -e
Expand All @@ -50,6 +40,7 @@ jobs:
with:
image-ref: "trivy-test"
format: "sarif"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
timeout: "20m0s"
ignore-unfixed: true
Expand Down

0 comments on commit 5a92fc6

Please sign in to comment.