-
Notifications
You must be signed in to change notification settings - Fork 315
51 lines (42 loc) · 1.26 KB
/
license-header-check.yml
File metadata and controls
51 lines (42 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Performs a license header check on new files.
# Results are uploaded as an artifact for the comment workflow.
name: License Header Check
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
license-header-check:
runs-on: ubuntu-latest
name: Check License Headers on New Files
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Run License Header Check
id: license-check
run: |
python .github/scripts/get-new-files.py | python .github/scripts/check-license-headers.py
- name: Save PR number
if: always()
run: echo "${{ github.event.pull_request.number }}" > pr_number.txt
- name: Upload results
if: always()
uses: actions/upload-artifact@v4
with:
name: license-check-results
path: |
pr_number.txt
violations.txt