Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add auto deployment for staging gcp deployment #6519

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,48 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

deploy-staging-gcp:
needs: build-production
name: Deploy to staging GCP cluster
runs-on: ubuntu-latest
environment:
name: Staging-GCP
url: https://care-staging.ohc.network/
steps:
- name: Checkout Kube Config
uses: actions/checkout@v3
with:
repository: coronasafe/care-staging-gcp
token: ${{ secrets.GIT_ACCESS_TOKEN }}
path: kube
ref: main

# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
with:
service_account_key: ${{ secrets.GKE_SA_KEY }}
project_id: ${{ secrets.GKE_PROJECT }}

# Get the GKE credentials so we can deploy to the cluster
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ secrets.GKE_CLUSTER }}
location: ${{ secrets.GKE_ZONE }}
credentials: ${{ secrets.GKE_SA_KEY }}

- name: install kubectl
uses: azure/setup-kubectl@v3.0
with:
version: "v1.23.6"
id: install

- name: Deploy Care Fe Production
run: |
mkdir -p $HOME/.kube/
cd kube/deployments/
sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml
kubectl apply -f care-fe.yaml

deploy-production-manipur:
needs: build-production
name: Deploy to GKE Manipur
Expand Down
Loading