Skip to content

Update Year

Update Year #1

Workflow file for this run

name: Update Year
on:
schedule:
- cron: "0 1 1 1 *" # 01:00 on January 1
jobs:
update_year:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Update year in LICENSE
uses: endormi/yearplusplus@v1
with:
files: 'LICENSE'
- name: Setup Git configuration
run: |
git config user.name "Year++"
git config user.email "<>"
- name: Commit changes
run: |
if [ -n "$(git status --porcelain)" ]; then
git commit -am "Update copyright year"
git push origin ${{ github.head_ref }}
else
echo "No changes to commit."
fi