Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: github action for testnet deploy with zeus 1.2.0 #1043

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/deploy-testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy Tenderly Testnet

on:
workflow_dispatch:
inputs:
upgrade_name:
description: "Enter the upgrade name (subdirectory in script/releases)"
required: true
type: string
environment:
description: "Select the environment"
required: true
type: choice
options:
- preprod
- testnet
- mainnet

# Ensures only those with write access can trigger this workflow.
permissions:
contents: write

jobs:
deploy:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a name field so it doesn't default to lowercase (for consistency between other workflows).

runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Verify upgrade_name directory exists
id: check_dir
run: |
if [ ! -d "script/releases/${{ github.event.inputs.upgrade_name }}" ]; then
echo "Error: The upgrade_name directory 'script/releases/${{ github.event.inputs.upgrade_name }}' does not exist!"
exit 1
fi

- name: Install Zeus CLI
run: npm install -g @layr-labs/zeus

- name: Run Zeus Deployment
env:
TENDERLY_API_KEY: ${{ secrets.TENDERLY_API_KEY }}
TENDERLY_ACCOUNT_SLUG: ${{ secrets.TENDERLY_ACCOUNT_SLUG }}
TENDERLY_PROJECT_SLUG: ${{ secrets.TENDERLY_PROJECT_SLUG }}
run: |
zeus run deploy \
--env "${{ github.event.inputs.environment }}" \
--upgrade "${{ github.event.inputs.upgrade_name }}" \
--fork tenderly