Skip to content

Update Wakatime Stats #418

Update Wakatime Stats

Update Wakatime Stats #418

name: Update Wakatime Stats
on:
schedule:
- cron: '*/30 * * * *' # Runs every 30 minutes
push:
branches:
- main
jobs:
update-wakatime:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Fetch Wakatime Stats
run: |
curl -H "Authorization: Bearer ${{ secrets.WAKATIME_API_KEY }}" -o wakatime-stats.json https://wakatime.com/api/v1/users/current/stats/last_7_days
- name: Commit and Push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add wakatime-stats.json
git commit -m "Update Wakatime stats"
git push