From 907014f0d631d9494ff9ae63c919c8ca7c9a994f Mon Sep 17 00:00:00 2001 From: fisker Date: Tue, 20 Feb 2024 21:16:16 +0800 Subject: [PATCH] Auto create pull request when data is updated --- .github/workflows/update.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/update.yml diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..e89d8cd --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,26 @@ +name: Update + +on: + workflow_dispatch: + schedule: + # “At 00:00 on Sunday.” https://crontab.guru/#0_0_*_*_0 + - cron: "0 0 * * 0" + +jobs: + update: + if: github.event_name != 'schedule' || github.repository == 'sindresorhus/globals' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + check-latest: true + node-version: latest + - run: npm install + - run: npm run update + - uses: peter-evans/create-pull-request@v6 + with: + commit-message: Update + branch: automated-update + branch-suffix: timestamp + title: Update