-
Notifications
You must be signed in to change notification settings - Fork 717
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add new workflow for governor token list update
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
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,43 @@ | ||
name: Governor Token List Update | ||
on: | ||
pull: | ||
schedule: | ||
- cron: '0 0 15 * *' # Run at 00:00 on the 15th of every month | ||
|
||
jobs: | ||
token-list-update: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.20.10" | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "16" | ||
- name: Generate new token list | ||
run: | | ||
cd node/hack/governor | ||
npm ci | ||
npm run start | ||
- name: Verify new token list | ||
run: | | ||
cd node/hack/governor | ||
go run check_query.go | ||
- name: Run Governor tests | ||
run: | | ||
cd node/pkg/governor | ||
go test | ||
- name: Read changes.txt file | ||
id: changes | ||
working-directory: "./node/hack/governor" | ||
run: echo "::set-output name=changes::$(cat changes.txt)" | ||
- name: Create Pull Request | ||
uses: peter-evans/[email protected] | ||
with: | ||
commit-message: "node: governor token list update" | ||
body: ${{ steps.changes.outputs.changes }} | ||
title: 'node: Governor token list update' | ||
branch: node/governor-token-list-update | ||
delete-branch: true | ||
draft: true |