2021-12-13 16:04:21 -05:00
|
|
|
name: 'Nightly'
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# * is a special character in YAML so you have to quote this string
|
|
|
|
- cron: '0 12 * * *'
|
2021-12-14 11:47:00 -05:00
|
|
|
workflow_dispatch:
|
2021-12-13 16:04:21 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
stat:
|
|
|
|
if: github.repository_owner == 'withastro'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out code using Git
|
2022-03-09 11:12:12 -05:00
|
|
|
uses: actions/checkout@v3
|
2022-03-08 16:46:11 -05:00
|
|
|
|
2022-10-28 13:36:50 -05:00
|
|
|
- name: Setup PNPM
|
|
|
|
uses: pnpm/action-setup@v2.2.1
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
cache: 'pnpm'
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install
|
2022-03-08 16:46:11 -05:00
|
|
|
|
2021-12-13 16:04:21 -05:00
|
|
|
- name: Collect stats
|
|
|
|
run: node scripts/stats/index.js
|
|
|
|
env:
|
2022-06-27 13:02:44 -05:00
|
|
|
# Needs access to collect stats from the GitHub API
|
|
|
|
GITHUB_TOKEN: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
|
|
|
|
|
2021-12-13 16:04:21 -05:00
|
|
|
- name: Commit changes
|
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
|
|
|
commit_message: '[ci] collect stats'
|
|
|
|
branch: ${{ github.head_ref }}
|
2022-06-27 13:02:44 -05:00
|
|
|
# Needs access to push to main
|
|
|
|
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
|
2021-12-13 16:04:21 -05:00
|
|
|
|
|
|
|
lockfile:
|
|
|
|
if: github.repository_owner == 'withastro'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-09 11:12:12 -05:00
|
|
|
|
2021-12-13 16:04:21 -05:00
|
|
|
- name: Check out code using Git
|
2022-03-09 11:12:12 -05:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
2022-10-28 13:36:50 -05:00
|
|
|
- name: Setup PNPM
|
|
|
|
uses: pnpm/action-setup@v2.2.1
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@v3
|
2021-12-13 16:04:21 -05:00
|
|
|
with:
|
2022-10-28 13:36:50 -05:00
|
|
|
node-version: 16
|
|
|
|
cache: 'pnpm'
|
2022-03-09 11:12:12 -05:00
|
|
|
|
2022-06-29 16:54:40 -05:00
|
|
|
- name: Delete the existing pnpm-lock.yaml file
|
|
|
|
run: rm pnpm-lock.yaml
|
|
|
|
|
|
|
|
- name: Create a fresh pnpm lockfile (no install)
|
|
|
|
run: pnpm install --lockfile-only
|
2022-03-09 11:12:12 -05:00
|
|
|
|
2021-12-13 16:04:21 -05:00
|
|
|
- name: Create Pull Request
|
|
|
|
id: createpr
|
|
|
|
uses: peter-evans/create-pull-request@v3
|
|
|
|
with:
|
2022-03-01 00:43:52 -05:00
|
|
|
branch: ci/lockfile
|
2022-06-27 13:02:44 -05:00
|
|
|
# Access token is needed to trigger CI on this PR
|
|
|
|
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
|
2021-12-13 16:04:21 -05:00
|
|
|
commit-message: '[ci] update lockfile'
|
|
|
|
title: '[ci] update lockfile'
|
|
|
|
body: >
|
2022-03-09 11:12:12 -05:00
|
|
|
This PR is auto-generated by a nightly GitHub action.
|
2021-12-13 16:04:21 -05:00
|
|
|
It should automatically be merged if tests pass.
|