Skip to content

Commit

Permalink
replace license header check with common action
Browse files Browse the repository at this point in the history
Signed-off-by: YanxuanLiu <[email protected]>
  • Loading branch information
YanxuanLiu committed Nov 27, 2024
1 parent a263915 commit 63d9970
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 75 deletions.
67 changes: 0 additions & 67 deletions .github/workflows/license-check/license-check.py

This file was deleted.

34 changes: 26 additions & 8 deletions .github/workflows/license-header-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,40 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# A workflow to check license header of files

name: Check License Headers
# A workflow to check copyright/license header
name: license header check

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

jobs:
check-headers:
license-header-check:
runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.title, '[bot]')"
steps:
- name: Get checkout depth
run: |
echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 10 ))" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: ${{ env.PR_FETCH_DEPTH }}

- name: license-check job
run: |
set -x
python3 .github/workflows/license-check/license-check.py
- name: license-header-check
uses: NVIDIA/spark-rapids-common/license-header-check@main
with:
included_file_patterns: |
*.sh,
*.template,
*.py,
*.yaml,
*.yml,
*.xml,
*.scala,
*.properties,
*.java,
*Makefile*,
*.sql

0 comments on commit 63d9970

Please sign in to comment.