Files
obsidian-releases/.github/workflows/plugin-stat.yml
T
2022-03-14 21:09:25 -04:00

29 lines
745 B
YAML

name: Pull plugin stats
on:
schedule:
- cron: "0 0 * * *"
# run it on closing PR to test the workflow, will remove once it works
# on:
# pull_request:
# types: [opened, closed, synchronize]
jobs:
pull-stats:
if: github.repository == 'obsidianmd/obsidian-releases'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 16.x
- run: |
git config --local user.name 'Obsidian Bot'
git config --local user.email 'admin@obsidian.md'
node update-stats.js
git add .
git commit -m "chore: Update plugin stats"
git push
env:
gh_token: ${{ secrets.GH_TOKEN }}