name: FOSSA License Scan

on:
  push:
    branches:
      - main

permissions:
  contents: read

jobs:
  fossa-scan:
    if: ${{ github.repository == 'detekt/detekt' }}
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3

      - name: Run FOSSA Scan
        uses: fossas/fossa-action@30055fd3dbc35d6ca57da934b5d8ac213a7871b4 # tag=v1
        with:
          api-key: ${{ secrets.FOSSA_API_KEY }}
