Skip to content

Commit

Permalink
Add inputs.go-licenses-ignore
Browse files Browse the repository at this point in the history
Fix issue 22

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed Mar 4, 2025
1 parent 800740a commit 800b689
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ inputs:
repo-access-token:
required: false
description: token needed to access repository commits for private repos
go-licenses-ignore:
required: false
description: list of go modules to bypass the go-licenses checks. Do not set this, except when go-licenses hits a false positive.
runs:
using: composite
steps:
Expand Down Expand Up @@ -95,8 +98,15 @@ runs:
- name: Check licenses
shell: bash
working-directory: ${{ inputs.working-directory }}
run: go-licenses check --include_tests ./... --allowed_licenses=Apache-2.0,BSD-2-Clause,BSD-2-Clause-FreeBSD,BSD-3-Clause,MIT,ISC,Python-2.0,PostgreSQL,X11,Zlib

env:
GO_LICENSES_IGNORE: ${{ inputs.go-licenses-ignore }}
run: |
set -eux
flags=
for f in ${GO_LICENSES_IGNORE}; do
flags="${flags} --ignore ${f}"
done
go-licenses check --include_tests ./... --allowed_licenses=Apache-2.0,BSD-2-Clause,BSD-2-Clause-FreeBSD,BSD-3-Clause,MIT,ISC,Python-2.0,PostgreSQL,X11,Zlib ${flags}
- name: Validate file headers
shell: bash
Expand Down

0 comments on commit 800b689

Please sign in to comment.