astro/.github/workflows/stat.yml
Fred K. Schott f14762bd12
wip (#1284)
2021-08-31 19:50:25 -07:00

31 lines
843 B
YAML

name: 'Collect Stats'
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 12 * * *'
env:
node_version: 14
jobs:
stat:
runs-on: ubuntu-latest
steps:
# Check out code using git
- uses: actions/checkout@v2
# Install Node 14
- uses: actions/setup-node@v1
with:
version: 14
- run: npm install @octokit/action
# Node.js script can be anywhere. A good convention is to put local GitHub Actions
# into the `.github/actions` folder
- run: node scripts/stats/index.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[ci] collect stats'
branch: ${{ github.head_ref }}