Skip to content

remove debug

remove debug #22

name: Verify and Define RPC Endpoints
on: [push] # Trigger the workflow on push
jobs:
check_rpc_endpoints:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- network: 'sepolia'
l1_rpc_url: "https://ci-sepolia-l1.optimism.io"
l2_rpc_url: "https://sepolia.optimism.io"
- network: 'goerli'
l1_rpc_url: "https://ci-goerli-l1.optimism.io"
l2_rpc_url: "https://goerli.optimism.io"
- network: 'mainnet'
l1_rpc_url: "https://ci-mainnet-l1.optimism.io"
l2_rpc_url: "https://mainnet.optimism.io"
# container:
# image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:latest
steps:
- uses: actions/checkout@v2
- name: Install JQ
run: sudo apt-get -y update && sudo apt-get -y install jq
- name: Check RPC Endpoints
id: check_endpoints
run: |
export TIME_DIFF_THRESHOLD="30"
if ops/verify-geth-endpoint.sh "${{ matrix.l1_rpc_url }}" $TIME_DIFF_THRESHOLD; then
if ops/verify-geth-endpoint.sh "${{ matrix.l2_rpc_url }}" $TIME_DIFF_THRESHOLD; then
echo "Both RPC endpoints are up to date and not syncing."
echo "::set-output name=l1_rpc_url::${{ matrix.l1_rpc_url }}"
echo "::set-output name=l2_rpc_url::${{ matrix.l2_rpc_url }}"
else
echo "L2 RPC endpoint for ${{ matrix.network }} failed the checks."
exit 1
fi
else
echo "L1 RPC endpoint for ${{ matrix.network }} failed the checks."
exit 1
fi
example_mainnet_job:
needs: check_rpc_endpoints
if: ${{ needs.check_rpc_endpoints.outputs.l1_rpc_url && needs.check_rpc_endpoints.outputs.l2_rpc_url }}
runs-on: ubuntu-latest
steps:
- name: Use RPC URLs
run: |
L1_RPC_URL=${{ needs.check_rpc_endpoints.outputs.l1_rpc_url }}
L2_RPC_URL=${{ needs.check_rpc_endpoints.outputs.l2_rpc_url }}
echo "L1 RPC URL: $L1_RPC_URL"
echo "L2 RPC URL: $L2_RPC_URL"
# Use L1_RPC_URL and L2_RPC_URL here.