fix(frontend): validate ss58 address length (#224) #26
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
name: Frontend | |
on: | |
workflow_dispatch: | |
push: | |
branches: ['main'] | |
paths: | |
- frontend/** | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | |
jobs: | |
build-frontend-image-staging: | |
runs-on: ubuntu-latest | |
environment: stg | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Log in to the github container registry | |
uses: docker/login-action@master | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Frontend Docker image | |
uses: docker/build-push-action@master | |
with: | |
file: frontend/Dockerfile | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-frontend:qa | |
build-args: | | |
VITE_VARA_NODE_ADDRESS=${{ secrets.VITE_VARA_NODE_ADDRESS }} | |
VITE_ETH_NODE_ADDRESS=${{ secrets.VITE_ETH_NODE_ADDRESS }} | |
VITE_ETH_CHAIN_ID=${{ secrets.VITE_ETH_CHAIN_ID }} | |
VITE_WALLET_CONNECT_PROJECT_ID=${{ secrets.VITE_WALLET_CONNECT_PROJECT_ID }} | |
VITE_INDEXER_ADDRESS=${{ secrets.VITE_INDEXER_ADDRESS }} | |
VITE_BRIDGING_PAYMENT_CONTRACT_ADDRESS=${{ secrets.VITE_BRIDGING_PAYMENT_CONTRACT_ADDRESS }} | |
VITE_ETH_BRIDGING_PAYMENT_CONTRACT_ADDRESS=${{ secrets.VITE_ETH_BRIDGING_PAYMENT_CONTRACT_ADDRESS }} | |
VITE_WRAPPED_VARA_CONTRACT_ADDRESS=${{ secrets.VITE_WRAPPED_VARA_CONTRACT_ADDRESS }} | |
deploy-to-k8s-staging: | |
needs: | |
[build-frontend-image-staging] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Deploy to k8s | |
uses: sergeyfilyanin/kubectl-aws-eks@master | |
with: | |
args: rollout restart deployment zk-bridge-stg -n zk-bridge | |
- name: Check k8s deployments | |
uses: sergeyfilyanin/kubectl-aws-eks@master | |
with: | |
args: get deployment -o name -n zk-bridge | xargs -n1 -t kubectl rollout status -n zk-bridge --timeout=120s |