Skip to content

Commit

Permalink
Update workflow: extract to env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
SinaKhalili committed Oct 11, 2024
1 parent 9543a2f commit 63727a4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
push:
branches: [master, sina/risk-dashboard-monorepo-update] # Temporarily allow this branch run the workflow

env:
ECR_REPO_URI: 875427118836.dkr.ecr.eu-west-1.amazonaws.com/v2-risk-dashboard
EKS_CLUSTER_NAME: drift-prod-cluster
K8S_ADMIN_ROLE_ARN: arn:aws:iam::875427118836:role/k8sAdmin

jobs:
build-frontend:
runs-on: ubicloud
Expand Down Expand Up @@ -67,8 +72,6 @@ jobs:
deploy:
runs-on: ubicloud
needs: [build-frontend, build-backend]
env:
ECR_REPO_URI: 875427118836.dkr.ecr.eu-west-1.amazonaws.com/v2-risk-dashboard
steps:
- name: Checkout Code
uses: actions/checkout@v3
Expand All @@ -86,6 +89,6 @@ jobs:

- name: Restart deployment
run: |
aws eks update-kubeconfig --name drift-prod-cluster --region eu-west-1 --role-arn arn:aws:iam::875427118836:role/k8sAdmin
aws eks update-kubeconfig --name ${{ env.EKS_CLUSTER_NAME }} --region eu-west-1 --role-arn ${{ env.K8S_ADMIN_ROLE_ARN }}
kubectl rollout restart -n mainnet-beta deployment/risk-dashboard-frontend
kubectl rollout restart -n mainnet-beta deployment/risk-dashboard-backend

0 comments on commit 63727a4

Please sign in to comment.