astro/.github/workflows/stat.yml

31 lines
881 B
YAML
Raw Normal View History

2021-09-01 02:50:25 +00:00
name: 'Collect Stats'
2021-11-02 14:13:36 +00:00
on:
2021-09-01 02:50:25 +00:00
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 12 * * *'
jobs:
stat:
if: github.repository == 'snowpackjs/astro'
2021-09-01 02:50:25 +00:00
runs-on: ubuntu-latest
steps:
2021-11-02 14:13:36 +00:00
- name: Check out code using Git
uses: actions/checkout@v2
- name: Set Node version to 16
uses: actions/setup-node@v2
2021-09-01 02:50:25 +00:00
with:
2021-11-02 14:13:36 +00:00
node-version: 16
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts
- name: Collect stats
run: node scripts/stats/index.js
2021-09-01 02:50:25 +00:00
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 }}