-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restore cci job and hide gha one for now
- Loading branch information
Showing
2 changed files
with
62 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
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" | ||
outputs: | ||
l1_rpc_url: ${{ steps.check_endpoints.outputs.l1_rpc_url }} | ||
l2_rpc_url: ${{ steps.check_endpoints.outputs.l2_rpc_url }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Check RPC Endpoints | ||
id: check_endpoints | ||
run: | | ||
curl ifconfig.me | ||
if ops/verify-geth-endpoint.sh "${{ matrix.l1_rpc_url }}"; then | ||
if ops/verify-geth-endpoint.sh "${{ matrix.l2_rpc_url }}"; then | ||
echo "Both RPC endpoints are up to date and not syncing." | ||
echo "l1_rpc_url=${{ matrix.l1_rpc_url }}" >> $GITHUB_OUTPUT | ||
echo "l2_rpc_url=${{ matrix.l2_rpc_url }}" >> $GITHUB_OUTPUT | ||
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 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use RPC URLs | ||
run: | | ||
curl ifconfig.me. | ||
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. | ||
#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" | ||
# outputs: | ||
# l1_rpc_url: ${{ steps.check_endpoints.outputs.l1_rpc_url }} | ||
# l2_rpc_url: ${{ steps.check_endpoints.outputs.l2_rpc_url }} | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# | ||
# - name: Check RPC Endpoints | ||
# id: check_endpoints | ||
# run: | | ||
# curl ifconfig.me | ||
# if ops/verify-geth-endpoint.sh "${{ matrix.l1_rpc_url }}"; then | ||
# if ops/verify-geth-endpoint.sh "${{ matrix.l2_rpc_url }}"; then | ||
# echo "Both RPC endpoints are up to date and not syncing." | ||
# echo "l1_rpc_url=${{ matrix.l1_rpc_url }}" >> $GITHUB_OUTPUT | ||
# echo "l2_rpc_url=${{ matrix.l2_rpc_url }}" >> $GITHUB_OUTPUT | ||
# 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 | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Use RPC URLs | ||
# run: | | ||
# curl ifconfig.me. | ||
# 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. |