Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Fixes frontend according to new contract changes #11

Fixes frontend according to new contract changes

Fixes frontend according to new contract changes #11

Workflow file for this run

name: Build and Deploy dapps GASA
on:
push:
branches: ['yd/testnet-version-gasa']
workflow_dispatch:
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:
wait-previous-run:
runs-on: ubuntu-latest
steps:
- uses: mktcode/consecutive-workflow-action@v1 # please read security note
with:
token: ${{ secrets.GITHUB_TOKEN }}
build-dapps-gasa-image:
runs-on: ubuntu-latest
needs: [wait-previous-run]
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 Racing Game image
uses: docker/build-push-action@master
with:
context: frontend
file: frontend/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
build-args: |
REACT_APP_FT_ADDRESS=${{ secrets.REACT_APP_FT_ADDRESS }}
REACT_APP_TESTNET_URL=${{ secrets.REACT_APP_TESTNET_URL }}
REACT_APP_AUTH_API_ADDRESS=${{ secrets.REACT_APP_AUTH_API_ADDRESS }}
REACT_APP_NODE_ADDRESS=${{ secrets.REACT_APP_NODE_ADDRESS }}
deploy-to-k8s:
needs: build-dapps-gasa-image
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 dapps-gasa -n gear-dapps
- name: Check k8s deployments
uses: sergeyfilyanin/kubectl-aws-eks@master
with:
args: get deployment -o name -n gear-dapps | xargs -n1 -t kubectl rollout status -n gear-dapps --timeout=120s