Skip to content

Commit d0f9619

Browse files
authored
replace license header check with common action (#200)
Signed-off-by: YanxuanLiu <[email protected]>
1 parent a263915 commit d0f9619

File tree

2 files changed

+26
-75
lines changed

2 files changed

+26
-75
lines changed

.github/workflows/license-check/license-check.py

Lines changed: 0 additions & 67 deletions
This file was deleted.

.github/workflows/license-header-check.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,40 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# A workflow to check license header of files
16-
17-
name: Check License Headers
15+
# A workflow to check copyright/license header
16+
name: license header check
1817

1918
on:
2019
pull_request:
2120
types: [opened, synchronize, reopened]
2221

2322
jobs:
24-
check-headers:
23+
license-header-check:
2524
runs-on: ubuntu-latest
25+
if: "!contains(github.event.pull_request.title, '[bot]')"
2626
steps:
27+
- name: Get checkout depth
28+
run: |
29+
echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 10 ))" >> $GITHUB_ENV
30+
2731
- name: Checkout code
2832
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
2935

30-
- name: license-check job
31-
run: |
32-
set -x
33-
python3 .github/workflows/license-check/license-check.py
36+
- name: license-header-check
37+
uses: NVIDIA/spark-rapids-common/license-header-check@main
38+
with:
39+
included_file_patterns: |
40+
*.sh,
41+
*.template,
42+
*.py,
43+
*.yaml,
44+
*.yml,
45+
*.xml,
46+
*.scala,
47+
*.properties,
48+
*.java,
49+
*Makefile*,
50+
*.sql
51+

0 commit comments

Comments
 (0)