Skip to content

Commit

Permalink
add license header check for test
Browse files Browse the repository at this point in the history
Signed-off-by: YanxuanLiu <[email protected]>
  • Loading branch information
YanxuanLiu committed Nov 11, 2024
1 parent d208004 commit 89b67d0
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/license-header-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright (c) 2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# A workflow to check if PR got sign-off
name: license header check

on:
pull_request_target:
types: [opened, synchronize, reopened]

jobs:
license-header-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get changed files
id: getChangedFiles
run: |
base_sha=${{ github.event.pull_request.base.sha }}
head_sha=${{ github.event.pull_request.head.sha }}
changed_files=$(git diff $base_sha $head_sha)
IFS=$'\n' read -d '' -r -a changed_files_array <<< "$changed_files"
- name: license-header-check
uses: YanxuanLiu/spark-rapids-common/license-header-check@license-header-check
with:
files: $changed_files_array
excludes: |
*.md
LICENSE

0 comments on commit 89b67d0

Please sign in to comment.