feat: initial #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check Go Dependency Licenses | |
| on: | |
| workflow_call: {} | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - go.mod | |
| - go.sum | |
| permissions: | |
| contents: read | |
| jobs: | |
| license-check: | |
| name: Check licenses of dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
| with: | |
| go-version: '1.24' | |
| - name: Install go-licenses | |
| run: | | |
| go install github.com/google/go-licenses@latest | |
| - name: check licenses | |
| run: | | |
| go-licenses check --allowed_licenses="Apache-2.0,BSD-3-Clause,MIT,MPL-2.0,ISC,BSD-2-Clause" ./... > licenses.csv 2> errors.licenses | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: logs | |
| path: | | |
| licenses.csv | |
| errors.licenses | |
| retention-days: 5 | |