This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git
The following commit(s) were added to refs/heads/main by this push:
new 02ab307 GitHub Action for RAT check (#173)
02ab307 is described below
commit 02ab307fc0014c29b1fe7524ecb87ed36a927ada
Author: dahn <[email protected]>
AuthorDate: Tue Aug 12 14:20:49 2025 +0200
GitHub Action for RAT check (#173)
Co-authored-by: Daan Hoogland <[email protected]>
---
.github/workflows/rat.yaml | 36 ++++++++++++++++++++++++++++++++++++
.rat-excludes | 7 +++++++
2 files changed, 43 insertions(+)
diff --git a/.github/workflows/rat.yaml b/.github/workflows/rat.yaml
new file mode 100644
index 0000000..76462d5
--- /dev/null
+++ b/.github/workflows/rat.yaml
@@ -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
diff --git a/.rat-excludes b/.rat-excludes
new file mode 100644
index 0000000..d871686
--- /dev/null
+++ b/.rat-excludes
@@ -0,0 +1,7 @@
+CHANGES.md
+go.sum
+rat-report.txt
+apache-rat-0.16.1
+snapcraft.yaml
+vendor
+.rat-excludes