Skip to content

Commit

Permalink
ci: update detection of accidentally added gpl licenses (#21384)
Browse files Browse the repository at this point in the history
* ci: update detection of accidentally added gpl licenses

* update checkout step name, use var that stays human friendly for reading on prs
  • Loading branch information
ttytm committed Apr 30, 2024
1 parent d8c480c commit 45eed64
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/other_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,28 @@ concurrency:
cancel-in-progress: true

jobs:
no-gpl-by-accident:
prevent-gpl-licenses:
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: No GPL licensed code, should be added accidentally
- name: Checkout V ${{ github.head_ref }}
uses: actions/checkout@v4
with:
path: v
- name: Checkout V master
uses: actions/checkout@v4
with:
repository: vlang/v
path: vmaster
- name: Detect potentially added GPL licensed code
run: |
! grep -r --exclude="*.yml" "a GPL license" .
gpl_search_cmd="grep 'GPL' -r --exclude-dir=.git --exclude=*.yml --exclude=*.md --exclude=*.vv --exclude=*_test.v ."
cd vmaster
eval $gpl_search_cmd > ../gpl_res_vmaster
cd ../v
eval $gpl_search_cmd > ../gpl_res_vnew
cd ..
diff -d -a -U 2 --color=always gpl_res_vmaster gpl_res_vnew
code-formatting:
runs-on: ubuntu-20.04
Expand Down

0 comments on commit 45eed64

Please sign in to comment.