name: Verify dependency licenses

on:
  push:
    branches:
      - main
  pull_request:
    types:
      - opened
      - reopened
      - synchronize

jobs:
  licensing:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - run: sudo gem install license_finder
      - run: go get -v ./...
      - run: license_finder
