-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6af3ef8
commit 4175591
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: skip-github | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Trivy scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
scan-type: 'fs' | ||
hide-progress: true | ||
output: trivy.txt | ||
|
||
- name: Publish Trivy Output to Summary | ||
run: | | ||
if [[ -s trivy.txt ]]; then | ||
{ | ||
echo "### Security Output" | ||
echo "<details><summary>Click to expand</summary>" | ||
echo "" | ||
echo '```terraform' | ||
cat trivy.txt | ||
echo '```' | ||
echo "</details>" | ||
} >> $GITHUB_STEP_SUMMARY | ||
fi | ||
- name: Trivy Scan and Report to PR | ||
uses: domstolene/trivy-pr-report@v1 | ||
with: | ||
github_token: ${{ github.token }} |