mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
* Update FOSSA configuration
* test FOSSA failure
* Update FOSSA files changed regex
* Revert "test FOSSA failure"
This reverts commit a97213db78
.
* pre-commit linting
* remove docker.txt check
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: License
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 8
|
|
- name: Generate fossa report
|
|
env:
|
|
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
|
|
run: |
|
|
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"
|
|
FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename')
|
|
|
|
cat<<EOF
|
|
CHANGED FILES:
|
|
$FILES
|
|
|
|
EOF
|
|
|
|
if [[ "${FILES}" =~ (.*package*\.json|requirements\/[a-z_-]+\.txt|setup\.py) ]]; then
|
|
echo "Detected dependency changes... running fossa check"
|
|
|
|
./scripts/fossa.sh
|
|
else
|
|
echo "No dependency changes... skiping fossa check"
|
|
fi
|
|
shell: bash
|
|
- name: Run license check
|
|
run: ./scripts/check_license.sh
|