astro/.github/workflows/stat.yml

32 lines
843 B
YAML
Raw Normal View History

2021-09-01 02:50:25 +00:00
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 }}