diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2d4847a..2a53020 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,9 +8,6 @@ on: permissions: read-all -env: - GO_VERSION: '1.20.x' - jobs: golangci: runs-on: ubuntu-latest @@ -27,4 +24,20 @@ jobs: with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. version: v1.51 - args: --timeout=5m \ No newline at end of file + args: --timeout=5m + + license-check: + name: license boilerplate check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 + with: + go-version: '1.20' + check-latest: true + - name: Install addlicense + run: go install github.com/google/addlicense@latest + - name: Check license headers + run: | + set -e + addlicense -check -l apache -c 'Chainguard, Inc.' -s=only -v *