1
ewpratten.com/.github/workflows/copyright-check.yml

22 lines
498 B
YAML

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