Skip to content

Hourly Update and Push #2048

Hourly Update and Push

Hourly Update and Push #2048

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 <[email protected]>"