name: Dependency License Checks

on:
  pull_request:
    paths:
      - "go.mod"
  workflow_dispatch: {}

jobs:
  fossa-scan:
    runs-on: ubuntu-latest
    steps:
      - name: "Checkout Code"
        uses: actions/checkout@v3

      - name: "Run FOSSA Scan"
        uses: fossas/fossa-action@main
        with:
          api-key: ${{secrets.FOSSA_API_KEY}}

      - name: "Run FOSSA Test"
        uses: fossas/fossa-action@main
        with:
          api-key: ${{secrets.FOSSA_API_KEY}}
          run-tests: true
