From 4175591c8bf6b60104f26b97f3a9cf671cb2a9ba Mon Sep 17 00:00:00 2001 From: Gabriel Batista Date: Sat, 27 Apr 2024 14:27:29 -0300 Subject: [PATCH] Create skip-github.yml --- .github/workflows/skip-github.yml | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/skip-github.yml diff --git a/.github/workflows/skip-github.yml b/.github/workflows/skip-github.yml new file mode 100644 index 0000000..106d566 --- /dev/null +++ b/.github/workflows/skip-github.yml @@ -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 "
Click to expand" + echo "" + echo '```terraform' + cat trivy.txt + echo '```' + echo "
" + } >> $GITHUB_STEP_SUMMARY + fi + + - name: Trivy Scan and Report to PR + uses: domstolene/trivy-pr-report@v1 + with: + github_token: ${{ github.token }}