-
Notifications
You must be signed in to change notification settings - Fork 13
feat: add dockerfile and entrypoint script to deploy hyperlane #51
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
Changes from all commits
f2edb52
2c22921
19ec3cc
5fd0e16
bb8983a
2c5028c
60cf345
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: Build and Push Docker Image | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| paths: | ||
| - '**/Dockerfile' | ||
| - '.github/workflows/docker.yml' | ||
|
|
||
| jobs: | ||
| build-and-push: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write # Required for pushing to GHCR | ||
|
|
||
| steps: | ||
| - name: Checkout source | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: ./hyperlane/Dockerfile | ||
| push: true | ||
| tags: ghcr.io/${{ github.repository_owner }}/hyperlane-init:latest |
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be extended to install foundry tools in order to complete the last step: I think this can be done in a follow up PR.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| FROM golang:1.24.3-alpine AS go-builder | ||
|
|
||
| WORKDIR /home/hyperlane | ||
|
|
||
| COPY hyperlane/go.* /home/hyperlane/ | ||
| COPY hyperlane/cmd /home/hyperlane/cmd | ||
|
|
||
| # Build your Go CLI for cosmosnative deployment | ||
| RUN go build -o hyp ./cmd/hyp | ||
|
|
||
| FROM node:24-slim | ||
|
|
||
| # Install the hyperlane CLI (used for evm deployment) | ||
| RUN npm install -g @hyperlane-xyz/cli | ||
|
|
||
| COPY --from=go-builder /home/hyperlane/hyp /usr/local/bin/hyp | ||
|
|
||
| WORKDIR /home/hyperlane | ||
|
|
||
| COPY hyperlane/configs /home/hyperlane/configs | ||
| COPY hyperlane/registry /home/hyperlane/registry | ||
| COPY hyperlane/scripts /home/hyperlane/scripts | ||
|
|
||
| ENTRYPOINT [ "scripts/docker-entrypoint.sh" ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| # NOTE: The following deployment strategy file is unused by the official Hyperlane CLI until cosmosnative support is added | ||
| celestia: | ||
| submitter: | ||
| chain: celestia | ||
| privateKey: 00ae97487709f19987c2d62caab232d2bb5e489fc319480970782096bf1eda6a | ||
| type: jsonRpc | ||
| userAddress: celestia13vedhr3w833pdwlr9ctnqjc5ezne8sfz7n63vj | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| export HYP_KEY=0x82bfcfadbf1712f6550d8d2c00a39f05b33ec78939d0167be2a737d691f33a6a | ||
|
|
||
| CONFIG_FILE="hyperlane-cosmosnative.json" | ||
|
|
||
| if [[ ! -f "$CONFIG_FILE" ]]; then | ||
| echo "Using Hyperlane registry:" | ||
| hyperlane registry list --registry ./registry | ||
|
|
||
| echo "Deploying Hyperlane core EVM contracts..." | ||
| hyperlane core deploy --chain rethlocal --registry ./registry --yes | ||
|
|
||
| echo "Deploying Hyperlane warp synthetic token EVM contracts..." | ||
| hyperlane warp deploy --config ./configs/warp-config.yaml --registry ./registry --yes | ||
|
|
||
| echo "Deploying Hyperlane on cosmosnative..." | ||
| hyp deploy celestia-validator:9090 | ||
| else | ||
| echo "Skipping deployment: $CONFIG_FILE already exists." | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simple build and push workflow, if we need to adjust this to use the one provided by celestia ops team then we can do that later, afaik the only difference is certain arch support for running k8s which we don't need here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just work when merged to main. Can take a look when this PR lands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hahaha I think the same thing every time I touch Docker CI workflows but I would not be surprised if a permission issue prevented this from working out of the box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/celestiaorg/celestia-zkevm-hl-testnet/actions/runs/15140709637/job/42563743792 😎