name: FOSSA
on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  analyze:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2.3.4

      - name: Install Fossa
        run: "curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash"

      - name: Fossa Configure & Analyze
        env:
          # FOSSA Push-Only API Token
          GITHUB_REF: $GITHUB_REF
          FOSSA_API_KEY: 9ee7e8893660832a7387dcc32377fb61
        run: node scripts/run-fossa.js
