Testing copyright checks
This commit is contained in:
parent
21d2530145
commit
f6d914d85f
21
.github/workflows/copyright-check.yml
vendored
Normal file
21
.github/workflows/copyright-check.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
name: Copyright Check
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 1 1 *"
|
||||
push:
|
||||
|
||||
jobs:
|
||||
check-copyright:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fetch current year
|
||||
run: |
|
||||
YEAR=$(date +%Y)
|
||||
echo "Current year is $YEAR"
|
||||
- name: Update LICENSE file
|
||||
run: |
|
||||
sed -i "s/$(date +%Y)/$YEAR/g" LICENSE
|
||||
- name: Check if LICENSE file has changed
|
||||
run: |
|
||||
git diff --quiet || git commit -am "Update LICENSE year to $YEAR" && git push
|
Loading…
x
Reference in New Issue
Block a user