only skip fossa on PRs (#9865)

This commit is contained in:
ʈᵃᵢ 2020-05-20 14:21:14 -07:00 committed by GitHub
parent 13c24372b0
commit ef6af935fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,11 @@ jobs:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
run: | run: |
set -eo pipefail set -eo pipefail
if [[ "${{github.event_name}}" != "pull_request" ]]; then
./scripts/fossa.sh
exit 0
fi
URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename') FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename')