-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cron job to sync supporters (#56)
* test sync-supporters job * add missing GH_TOKEN * use github-push-action * revert github-push-action * simplify * delete-branch: true * change committer to bot * try adding author * actions/checkout@v4 * use peter-evans/create-pull-request@v5 * another tweak * equal author and committer * set author and committer to github-actions[bot] * schedule cron * remove on push
- Loading branch information
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Sync supporters | ||
|
||
on: | ||
schedule: | ||
- cron: "0 7 * * *" # Runs daily at 7:00 UTC | ||
|
||
jobs: | ||
updateSupporters: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run npm script | ||
run: npm run sync-supporters | ||
|
||
- name: Create/Update Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: Update supporters | ||
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | ||
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | ||
title: "[Auto PR] Update supporters" | ||
body: "Supporters list has been updated." | ||
branch: github-action/update-supporters | ||
delete-branch: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters