-
Notifications
You must be signed in to change notification settings - Fork 74
46 lines (39 loc) · 1.22 KB
/
rat.yaml
File metadata and controls
46 lines (39 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: RAT Check
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
rat:
name: Apache RAT Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Download Apache RAT
run: |
curl -L -O https://downloads.apache.org/creadur/apache-rat-0.16.1/apache-rat-0.16.1-bin.tar.gz
tar -xzf apache-rat-0.16.1-bin.tar.gz
- name: Create exception list
run: |
echo ./exception.lst >exception.lst
echo ./CHANGES.md >>exception.lst
echo ./go.sum >>exception.lst
echo ./rat-report.txt >>exception.lst
echo ./apache-rat-0.16.1/* >>exception.lst
echo ./snap/snapcraft.yaml >>exception.lst
echo ./vedor/* >>exception.lst
- name: Run RAT
run: |
java -jar apache-rat-0.16.1/apache-rat-0.16.1.jar -d . -E exception.lst > rat-report.txt
cat rat-report.txt
# Fail if unapproved licenses are found
grep -q 'Unknown Licenses' rat-report.txt && exit 1 || exit 0