-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.19 KB
/
spdx-checker.yml
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
name: SPDX Header Checker
on:
workflow_dispatch:
workflow_call:
pull_request:
branches:
- "main"
types:
- opened
- reopened
- synchronize
- assigned
- review_requested
jobs:
run-spdx-header-script:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
python-version: "3.8"
- name: Run SPDX Header Script
run: |
echo "Running SPDX header script on all files in the repository"
python ./scripts/add_spdx_header.py
- name: Check for changes
run: |
git status
if git diff --quiet; then
echo "No changes detected."
exit 0
else
echo "Changes detected, committing changes."
fi
- name: Commit changes
if: success()
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: SPDX-Bot
commit_user_email: [email protected]
commit_message: "🚨✨AUTOMATED COMMIT | Added missing SPDX license headers automatically"
branch: ${{ github.head_ref }}
commit_options: "--verbose"