-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create workflow main: merge fetch price and earning. Update queue Git…
…Hub action
- Loading branch information
Showing
13 changed files
with
108 additions
and
139 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
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
This file was deleted.
Oops, something went wrong.
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
28 changes: 21 additions & 7 deletions
28
.github/workflows/fetch-price-main.yml → .github/workflows/health-check-main.yml
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 |
---|---|---|
@@ -1,45 +1,59 @@ | ||
name: Fetch Price Main | ||
name: RPC Health Check Main | ||
on: | ||
schedule: | ||
- cron: "*/30 * * * *" | ||
- cron: "*/15 * * * *" | ||
workflow_dispatch: | ||
branches: | ||
- main | ||
inputs: | ||
note: | ||
description: 'Health check' | ||
required: false | ||
default: '' | ||
|
||
concurrency: 'main' | ||
|
||
jobs: | ||
health-check: | ||
if: "! startsWith(github.event.head_commit.message, '[CI Skip]')" | ||
runs-on: ubuntu-22.04 | ||
name: Fetch Price Rate | ||
name: RPC Health Check | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
ref: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_AUTOMATION_TOKEN }} | ||
|
||
- name: Set input data | ||
id: input_data | ||
run: | | ||
if [[ ${{ github.ref }} == 'refs/heads/master' ]]; then | ||
echo "target=latest" >> $GITHUB_OUTPUT | ||
else | ||
echo "target=beta" >> $GITHUB_OUTPUT | ||
fi | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
run: | | ||
yarn install | ||
yarn install | ||
- name: Run scripts | ||
run: | | ||
NODE_ENV=production yarn fetch-price | ||
NODE_ENV=production yarn export-error-rpc | ||
- name: Commit changes | ||
id: commit_changes | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
author_name: Github-Bot | ||
author_email: [email protected] | ||
message: '[CI Skip] Fetch Price (main)' | ||
message: '[CI Skip] Update error rpcs' | ||
|
||
- name: Log commit changes | ||
run: | | ||
|
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
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
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
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
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,11 @@ | ||
import {fetchEarning} from "./fetch-earning.mjs"; | ||
import {fetchPrice} from "./fetch-price.js"; | ||
|
||
const main = async () => { | ||
await Promise.all([ | ||
fetchEarning(), | ||
fetchPrice(), | ||
]) | ||
} | ||
|
||
main().catch(console.error) |
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
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
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