Skip to content

Commit 00e8f97

Browse files
committed
Add license-finder check in github CI
1 parent 07e8524 commit 00e8f97

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ on:
55
- pull_request
66

77
jobs:
8+
license_checks:
9+
name: License checks
10+
timeout-minutes: 15
11+
needs:
12+
- build_docker_image
13+
runs-on: '${{ fromJSON(needs.build_docker_image.outputs.runs_on) }}'
14+
if: '${{ !needs.build_docker_image.outputs.is_master_or_merge_queue && !needs.build_docker_image.outputs.skip_run }}'
15+
container:
16+
image: 248848202840.dkr.ecr.eu-west-1.amazonaws.com/${{ needs.build_docker_image.outputs.image_repository }}:${{ github.sha }}
17+
credentials:
18+
username: '${{ secrets.AWS_ECR_USERNAME }}'
19+
password: '${{ secrets.AWS_ECR_PASSWORD }}'
20+
steps:
21+
- name: Run license checks
22+
run: |
23+
bundle exec license_finder || (cat <<-END && exit 1)
24+
25+
You seem to be introducing a new license into our stack, please reach out to
26+
#licenses-tech-stack on slack to get guidance on the topic.
27+
END
28+
829
test:
930
runs-on: ubuntu-latest
1031
strategy:

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ruby 3.4.7

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
source 'https://rubygems.org'
22
gemspec
33

4-
4+
group :test, :development do
5+
gem 'license_finder', require: false
6+
end

0 commit comments

Comments
 (0)