Skip to content

Commit 861964a

Browse files
authored
feat: Added license check (#4368)
* Added license checker * License check fix * add license check run * Added github action for license check * License check update * Added experimental flag * Removed unused target
1 parent 0df7eb5 commit 861964a

File tree

12 files changed

+80
-10
lines changed

12 files changed

+80
-10
lines changed

.github/pull_request_template.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ Fixes #000.
1010

1111
Read the [Gruntwork contribution guidelines](https://gruntwork.notion.site/Gruntwork-Coding-Methodology-02fdcd6e4b004e818553684760bf691e).
1212

13+
- [ ] I authored this code entirely myself
14+
- [ ] I am submitting code based on open source software (e.g. MIT, MPL-2.0, Apache)]
15+
- [ ] I am adding or upgrading a dependency or adapted code and confirm it has a compatible open source license
1316
- [ ] Update the docs.
1417
- [ ] Run the relevant tests successfully, including pre-commit checks.
15-
- [ ] Ensure any 3rd party code adheres with our [license policy](https://www.notion.so/gruntwork/Gruntwork-licenses-and-open-source-usage-policy-f7dece1f780341c7b69c1763f22b1378) or delete this line if its not applicable.
1618
- [ ] Include release notes. If this PR is backward incompatible, include a migration guide.
1719

1820
## Release Notes (draft)

.github/scripts/setup/generate-mocks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22

33
set -euo pipefail
44

5-
make install-mock-tools
65
make generate-mocks

.github/workflows/build-no-proxy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
uses: jdx/mise-action@v2
3838
with:
3939
version: 2025.4.4
40+
experimental: true
4041
env:
4142
# Adding token here to reduce the likelihood of hitting rate limit issues.
4243
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
uses: jdx/mise-action@v2
3838
with:
3939
version: 2025.4.4
40+
experimental: true
4041
env:
4142
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4243

.github/workflows/codespell.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
uses: jdx/mise-action@v2
2929
with:
3030
version: 2025.4.4
31+
experimental: true
3132
mise_toml: |
3233
[tools]
3334
python = "3.13.3"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: License Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
10+
jobs:
11+
license-check:
12+
name: License Check
13+
runs-on: ubuntu-latest
14+
env:
15+
MISE_PROFILE: cicd
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Use mise to install dependencies
22+
uses: jdx/mise-action@v2
23+
with:
24+
version: 2025.4.4
25+
experimental: true
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Run License Check
30+
id: run-license-check
31+
run: |
32+
set -o pipefail
33+
make license-check | tee license-check.log
34+
shell: bash
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Upload License Check Report
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: license-check-report-ubuntu
42+
path: license-check.log

.github/workflows/lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
uses: jdx/mise-action@v2
1919
with:
2020
version: 2025.4.4
21+
experimental: true
2122
env:
2223
# Adding token here to reduce the likelihood of hitting rate limit issues.
2324
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/strict-lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
uses: jdx/mise-action@v2
1616
with:
1717
version: 2025.4.4
18+
experimental: true
1819
env:
1920
# Adding token here to reduce the likelihood of hitting rate limit issues.
2021
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ terragrunt
1717
.terragrunt-stack
1818
.devcontainer.json
1919
.cursor/
20-
.env
20+
.env
21+
.licensei.cache

.licensei.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
approved = [
2+
"apache-2.0",
3+
"bsd-2-clause",
4+
"bsd-3-clause",
5+
"isc",
6+
"mpl-2.0",
7+
"mit",
8+
]
9+
10+
ignored = [
11+
"github.com/terraform-linters/tflint-plugin-sdk",
12+
"github.com/owenrumney/go-sarif",
13+
"github.com/davecgh/go-spew"
14+
]
15+
16+
17+
[header]
18+
ignorePaths = ["vendor", ".gen"]
19+
ignoreFiles = ["mock_*.go", "*_gen.go"]

0 commit comments

Comments
 (0)