Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/rat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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: Run RAT
run: |
java -jar apache-rat-0.16.1/apache-rat-0.16.1.jar -d . -E .rat-excludes > rat-report.txt
cat rat-report.txt
# Fail if unapproved licenses are found
grep -qe '^0 Unknown Licenses' rat-report.txt && exit 0 || exit 1
7 changes: 7 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CHANGES.md
go.sum
rat-report.txt
apache-rat-0.16.1
snapcraft.yaml
vendor
.rat-excludes