-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (68 loc) · 2.92 KB
/
Copy pathhourly-update-and-push.yml
File metadata and controls
81 lines (68 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Hourly Update and Push
on:
# Execute this workflow every hour
schedule:
- cron: "0 * * * *"
# Allows you to trigger manually from GitHub's Actions tab
workflow_dispatch:
# Here we can add a multi-select input to choose which runners to run,
# and pass it to the bun start command with --run-types
inputs:
run_types:
type: choice
description: "The type of runners to perform"
options:
- testnet
- mainnet
- default
- alchemy
- quicknode
- headless-kittypunch
jobs:
updateAndPush:
runs-on: ubuntu-latest
permissions:
contents: write
env:
RECIPIENT: ${{ vars.RECIPIENT }}
MAINNET_FLOW_ADDRESS: ${{ vars.MAINNET_FLOW_ADDRESS }}
TESTNET_FLOW_ADDRESS: ${{ vars.TESTNET_FLOW_ADDRESS }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
FLOW_PRIVATE_KEY: ${{ secrets.FLOW_PRIVATE_KEY }}
TESTNET_ALCHEMY_URL: ${{ secrets.TESTNET_ALCHEMY_URL }}
MAINNET_ALCHEMY_URL: ${{ secrets.MAINNET_ALCHEMY_URL }}
TESTNET_QUICKNODE_URL: ${{ secrets.TESTNET_QUICKNODE_URL }}
MAINNET_QUICKNODE_URL: ${{ secrets.MAINNET_QUICKNODE_URL }}
CHROME_METAMASK_PASSWORD: ${{ secrets.CHROME_METAMASK_PASSWORD }}
CHROME_METAMASK_MNEMONIC: ${{ secrets.CHROME_METAMASK_MNEMONIC }}
FLOW_WALLET_USERNAME: ${{ vars.FLOW_WALLET_USERNAME }}
FLOW_WALLET_MNEMONIC: ${{ secrets.FLOW_WALLET_MNEMONIC }}
steps:
# checkout current branch
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Install dependencies (curl, jq, unzip)
run: |
sudo apt-get update
sudo apt-get install -y curl jq unzip
- name: Download Extensions
run: ./scripts/download_metamask.sh
- name: Download Flow Wallet Extension
run: ./scripts/download_flowwallet.sh
- uses: oven-sh/setup-bun@v2
- name: Install Dependencies
run: bun install
- name: Install Playwright Chrome
run: npx playwright install chromium
# If run_types is empty, run all runners
- name: Run the output generation
run: bun start --run-types ${{inputs.run_types}}
- name: Commit all updates
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update latency results."
# Use current branch if not specified
branch: ${{ inputs.branch || github.ref }}
file_pattern: "outputs/*.*"
commit_author: "GitHub Action <actions@github.com>"