Skip to content

Commit

Permalink
build(ci): add license header check
Browse files Browse the repository at this point in the history
also remove sbom generation from ci workflow, it doesn't serve any purpose

Signed-off-by: nscuro <[email protected]>
  • Loading branch information
nscuro committed Feb 7, 2022
1 parent 4dabde3 commit 1e627f6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@ on:
- master

jobs:
golangci:
licensecheck:
name: License Check
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Check license headers
uses: apache/[email protected]
with:
config: .licenserc.yml

lint:
name: Lint
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -45,8 +56,3 @@ jobs:
uses: actions/checkout@v2
- name: Test
run: make test
- name: Generate SBOM
uses: CycloneDX/gh-gomod-generate-sbom@v1
with:
version: v1
args: mod -licenses -json -type library -verbose
19 changes: 19 additions & 0 deletions .licenserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
header:
license:
spdx-id: Apache-2.0
copyright-owner: OWASP Foundation
paths-ignore:
- ".github/**"
- ".gitignore"
- ".gitpod.*"
- ".golangci.yml"
- ".goreleaser.yml"
- ".licenserc.yml"
- "**/*.md"
- "**/go.mod"
- "**/go.sum"
- "**/testdata/**"
- "CODEOWNERS"
- "LICENSE"
- "Makefile"
- "NOTICE"

0 comments on commit 1e627f6

Please sign in to comment.