Move "dependents count update" out of release (#20100)
Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
1 parent
d5b0490aa9
commit
92ee7178a6
5 files changed
+160
-119
No files matched your search
@@ -0,0 +1,44 @@
|
||||
name: Update dependents count
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# “At 00:00 on day-of-month 1.” https://crontab.guru/#0_0_1_*_*
|
||||
- cron: "0 0 1 * *"
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: Update dependents count
|
||||
if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn --immutable
|
||||
|
||||
- name: Run script
|
||||
run: node scripts/update-dependents-count.js
|
||||
|
||||
- name: Format website
|
||||
run: yarn prettier website/src/pages/index.jsx --write
|
||||
|
||||
- name: Set current date env
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> "$GITHUB_ENV"
|
||||
|
||||
- uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
||||
with:
|
||||
commit-message: Update dependents count (${{ env.CURRENT_DATE }})
|
||||
branch: automated-update-dependents-count-${{ env.CURRENT_DATE }}
|
||||
branch-suffix: timestamp
|
||||
title: Update dependents count (${{ env.CURRENT_DATE }})
|
||||
Reference in new issue
Block a user