Skip to content

Sync Authored Year

Sync Authored Year #3

name: Sync Authored Year
"on":
schedule:
- cron: '0 4 1 * *'
workflow_dispatch:
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: 'npm'
- name: Sync authored year
run: npm run sync:year
- name: Commit changes when needed
run: |
set -e
if git diff --quiet; then
echo "No authored year changes needed."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add README.md README.en.md
git commit -m "chore: sync authored year"
git push