name: Check license of dependencies
on: [push, pull_request]
permissions:
  contents: read

jobs:
  licenses:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
    - uses: WillAbides/setup-go-faster@v1
      with:      
        go-version: '1.23.x'

    - name: Install lian
      run: go install lucor.dev/lian@latest

    - name: Check license of dependencies against go.mod
      run: lian -d --allowed="Apache-2.0, BSD-2-Clause, BSD-3-Clause, MIT, ISC" --excluded=github.com/jsummers/gobmp@v0.0.0-20151104160322-e2ba15ffa76e

