-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZK-612: Add workflow for deploying to stage (#51)
- Loading branch information
Showing
3 changed files
with
77 additions
and
2 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
59 changes: 59 additions & 0 deletions
59
.github/workflows/testnet-dev-build-and-deploy-shielder-relayer.yml
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
name: "[DEV] Build and deploy shielder-relayer" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
overwrite-shielder-address: | ||
type: string | ||
required: false | ||
default: '' | ||
description: Overwrite shielder address - if empty it's not changed | ||
|
||
jobs: | ||
build-and-push: | ||
name: Build and push shielder-relayer | ||
runs-on: [self-hosted, Linux, X64, medium] | ||
steps: | ||
- name: GIT | Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Prepare Rust env | ||
uses: ./.github/actions/prepare-rust-env | ||
with: | ||
poseidon-gadget-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
zkos-circuits-private-key: ${{ secrets.ZKOS_CIRCUITS_SSH_PRIVATE_KEY }} | ||
|
||
- name: Build relayer | ||
run: cd crates/shielder-relayer && make build | ||
|
||
- name: DOCKER | Build and push | ||
uses: ./.github/actions/shielder-relayer/build-and-push | ||
id: build_shielder_relayer | ||
with: | ||
aws-mainnet-ecr-access-key-id: ${{ secrets.AWS_MAINNET_ECR_ACCESS_KEY_ID }} | ||
aws-mainnet-ecr-access-key: ${{ secrets.AWS_MAINNET_ECR_ACCESS_KEY }} | ||
ecr-private-host: ${{ secrets.ECR_PRIVATE_HOST }} | ||
outputs: | ||
image_tag: ${{ steps.build_shielder_relayer.outputs.image_tag }} | ||
|
||
deploy: | ||
name: Deploy shielder-relayer | ||
needs: [build-and-push] | ||
runs-on: [self-hosted, Linux, X64, medium] | ||
steps: | ||
- name: GIT | Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: KUSTOMIZE | Deploy | ||
uses: ./.github/actions/shielder-relayer/deploy | ||
id: deploy_shielder_relayer | ||
with: | ||
environment: dev | ||
image-tag: ${{ needs.build-and-push.outputs.image_tag }} | ||
autocommit-author: ${{ secrets.AUTOCOMMIT_AUTHOR }} | ||
autocommit-email: ${{ secrets.AUTOCOMMIT_EMAIL }} | ||
github-token: ${{ secrets.CI_GH_TOKEN }} | ||
kustomize-version: ${{ vars.KUSTOMIZE_VERSION }} | ||
ecr-private-host: ${{ secrets.ECR_PRIVATE_HOST }} | ||
overwrite-shielder-address: ${{ inputs.overwrite-shielder-address }} |
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