DaanHoogland commented on code in PR #173:
URL: 
https://github.com/apache/cloudstack-cloudmonkey/pull/173#discussion_r2257031432


##########
.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: 11
+
+      - 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.jar -d . -e vendor > rat-report.txt
+          cat rat-report.txt
+          # Fail if unapproved licenses are found
+          grep -q 'Unknown Licenses' rat-report.txt && exit 1 || exit 0

Review Comment:
   ```suggestion
             grep -q 'Unknown Licenses' rat-report.txt && exit 1 || exit 0
   
   ```



##########
.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: 11
+
+      - 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.jar -d . -e vendor > rat-report.txt

Review Comment:
   ```suggestion
             java -jar apache-rat-0.16.1/apache-rat-0.16.1.jar -d . -e vendor > 
rat-report.txt
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to