Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kie-issues#1613: Migrate CI :: Check license headers apache-rat v0.16.1 #3144

Merged
merged 14 commits into from
Nov 27, 2024
11 changes: 5 additions & 6 deletions .github/workflows/ci_check_license_headers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
# under the License.
#

name: "CI :: Check license headers"
name: "CI :: License headers"

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
check-license-headers:
check:
runs-on: ubuntu-latest

steps:
Expand All @@ -33,10 +33,9 @@ jobs:

- name: Download Apache RAT
run: |
curl -LO https://repository.apache.org/content/repositories/snapshots/org/apache/rat/apache-rat/0.17-SNAPSHOT/apache-rat-0.17-20241115.065104-374.jar
curl -LO https://repo1.maven.org/maven2/org/apache/rat/apache-rat/0.16.1/apache-rat-0.16.1.jar

- name: Run Apache RAT
run: |
java -jar apache-rat-0.17-20241115.065104-374.jar --input-exclude-file .rat-excludes -- . > .tmp-rat-check-output
cat .tmp-rat-check-output
grep "Files with unapproved licenses:" .tmp-rat-check-output && rm .tmp-rat-check-output && echo "There are files with missing or unapproved license headers." && exit 1 || rm .tmp-rat-check-output && echo "All files have correct license headers."
java -jar apache-rat-0.16.1.jar -d . -E .rat-excludes | grep "== File:" && echo "The files listed above are missing license headers." && exit 1 || echo "All files have license headers."

Loading
Loading