Skip to content

Commit e188c66

Browse files
authored
ci: add dedicated RAT license check workflow for all PRs (#3664)
* ci: add dedicated RAT license check workflow for all PRs The existing build workflows (pr_build_linux, spark_sql_test, etc.) use paths-ignore to skip docs-only changes, which also skips the RAT license header check. This allowed files without Apache license headers to be merged via docs-only PRs. Add a lightweight dedicated workflow that runs RAT on all PRs with no path filters. Uses -N (non-recursive) to skip child module builds since RAT scans the full directory tree from the parent pom. * fix: add explicit permissions to RAT check workflow * ci: use ubuntu-slim runner for RAT check
1 parent 8434c87 commit e188c66

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/pr_rat_check.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: RAT License Check
19+
20+
concurrency:
21+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
22+
cancel-in-progress: true
23+
24+
permissions:
25+
contents: read
26+
27+
# No paths-ignore: this workflow must run for ALL changes including docs
28+
on:
29+
push:
30+
branches:
31+
- main
32+
pull_request:
33+
workflow_dispatch:
34+
35+
jobs:
36+
rat-check:
37+
name: RAT License Check
38+
runs-on: ubuntu-slim
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Set up Java
42+
uses: actions/setup-java@v4
43+
with:
44+
distribution: temurin
45+
java-version: 11
46+
- name: Run RAT check
47+
run: ./mvnw -B -N apache-rat:check

0 commit comments

Comments
 (0)