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 }}