Skip to content

Update Year in README #2

Update Year in README

Update Year in README #2

Workflow file for this run

name: Update Year in README
on:
schedule:
- cron: '0 0 1 1 *' # Runs on January 1st every year
workflow_dispatch: # Allows manual triggering
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Update year in README
run: |
current_year=$(date +"%Y")
sed -i "s/\*\([0-9]\{4\}\)\*/\*$current_year\*/g" README.md
- name: Commit and push changes
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
git commit -am "Update year in README to $(date +"%Y")" || exit 0
git push