diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index 7ab012687b..38f227d88b 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -9,18 +9,28 @@ jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [14.x] - steps: - - uses: actions/checkout@v2 - # Runs a set of commands to initialize and analyze with FOSSA - - name: run FOSSA analysis - env: - # FOSSA Push-Only API Token - FOSSA_API_KEY: '9ee7e8893660832a7387dcc32377fb61' + - name: Checkout + uses: actions/checkout@v2.3.4 + + # We use this to modify the generated .fossa.yml + - name: Install yq + run: sudo snap install yq + + - name: Install Fossa + run: "curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash" + + - name: Configure Fossa + # The --option flag for fossa init does not work yet, see https://github.com/fossas/fossa-cli/issues/614 run: | - curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash - fossa init - fossa analyze + fossa init --project PROJECT_NAME + yq eval -i '.analyze.modules[].options.strategy = "yarn-list"' .fossa.yml + yq eval -i 'del(.analyze.modules[] | select(.type == "mvn"))' .fossa.yml + + - name: Show config + run: cat .fossa.yml + + - name: Fossa Analyze + env: + FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} + run: fossa analyze --branch "$GITHUB_REF"