This repository has been archived by the owner on Jan 9, 2024. It is now read-only.
Fix bonded funds balance display #34
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: Deploy CB dashboard | |
on: | |
push: | |
branches: ['master'] | |
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 }} | |
KUBE_NAMESPACE: gear-dapps | |
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-and-push-dashboard-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 Dashboard image | |
uses: docker/build-push-action@master | |
with: | |
file: Dockerfile | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
deploy-dashboard-k8s: | |
needs: [build-and-push-dashboard-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 cb-dashboard -n $KUBE_NAMESPACE |