2021-12-13 21:04:21 +00:00
|
|
|
name: 'Nightly'
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# * is a special character in YAML so you have to quote this string
|
|
|
|
- cron: '0 12 * * *'
|
2021-12-14 16:47:00 +00:00
|
|
|
workflow_dispatch:
|
2021-12-13 21:04:21 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
stat:
|
|
|
|
if: github.repository_owner == 'withastro'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out code using Git
|
|
|
|
uses: actions/checkout@v2
|
2022-01-18 22:15:25 +00:00
|
|
|
- uses: pnpm/action-setup@v2.0.1
|
|
|
|
with:
|
|
|
|
version: 6.23.x
|
2021-12-13 21:04:21 +00:00
|
|
|
- name: Set Node version to 16
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 16
|
2022-01-18 22:15:25 +00:00
|
|
|
cache: 'pnpm'
|
2021-12-13 21:04:21 +00:00
|
|
|
- name: Install dependencies
|
2022-01-18 22:17:47 +00:00
|
|
|
run: pnpm install --ignore-scripts
|
2021-12-13 21:04:21 +00:00
|
|
|
- name: Collect stats
|
|
|
|
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 }}
|
|
|
|
|
|
|
|
lockfile:
|
|
|
|
if: github.repository_owner == 'withastro'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Check out code using Git
|
|
|
|
uses: actions/checkout@v2
|
2022-01-18 22:15:25 +00:00
|
|
|
|
|
|
|
- uses: pnpm/action-setup@v2.0.1
|
|
|
|
with:
|
|
|
|
version: 6.23.x
|
2021-12-13 21:04:21 +00:00
|
|
|
|
|
|
|
- name: Set Node version to 16
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 16
|
2022-01-18 22:15:25 +00:00
|
|
|
cache: 'pnpm'
|
2021-12-13 21:04:21 +00:00
|
|
|
|
|
|
|
- name: Clear lockfile
|
2022-01-18 22:15:25 +00:00
|
|
|
run: rm -rf pnpm-lock.yaml node_modules
|
2021-12-13 21:04:21 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
2022-01-18 22:15:25 +00:00
|
|
|
run: pnpm install --ignore-engines --ignore-scripts
|
2021-12-13 21:04:21 +00:00
|
|
|
|
|
|
|
- name: Create Pull Request
|
|
|
|
id: createpr
|
|
|
|
uses: peter-evans/create-pull-request@v3
|
|
|
|
with:
|
2021-12-14 16:45:23 +00:00
|
|
|
token: ${{ secrets.NIGHTLY_PERSONAL_GITHUB_TOKEN }}
|
2021-12-13 21:04:21 +00:00
|
|
|
commit-message: '[ci] update lockfile'
|
|
|
|
title: '[ci] update lockfile'
|
|
|
|
body: >
|
|
|
|
This PR is auto-generated by a nightly GitHub action.
|
|
|
|
It should automatically be merged if tests pass.
|
|
|
|
|
|
|
|
- name: Mark Pull Request for Auto-Merge
|
|
|
|
if: steps.createpr.outputs.pull-request-operation == 'created'
|
|
|
|
uses: peter-evans/enable-pull-request-automerge@v1
|
|
|
|
with:
|
2021-12-14 16:45:23 +00:00
|
|
|
token: ${{ secrets.NIGHTLY_PERSONAL_GITHUB_TOKEN }}
|
2021-12-13 21:04:21 +00:00
|
|
|
pull-request-number: ${{ steps.createpr.outputs.pull-request-number }}
|
2021-12-14 16:45:23 +00:00
|
|
|
merge-method: squash
|