K8s_Apps #38
Workflow file for this run
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: K8s_Apps | |
on: | |
workflow_dispatch: # On Demand Deploy | |
permissions: | |
contents: read | |
issues: read | |
checks: write | |
pull-requests: write | |
id-token: 'write' | |
jobs: | |
deploy: | |
name: DeployApps | |
runs-on: ubuntu-latest | |
environment: Dev | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# https://github.com/google-github-actions/auth | |
- name: Authenticate with Google Cloud | |
uses: 'google-github-actions/auth@v2' | |
with: | |
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITYPROVIDER }} | |
service_account: ${{ secrets.SERVICE_ACCOUNT }} | |
- name: Configure kubectl | |
uses: google-github-actions/setup-gcloud@v2 | |
with: | |
project_id: ${{ secrets.PROJECT_ID }} | |
- name: Cluster Connection | |
run: | | |
gcloud components install gke-gcloud-auth-plugin | |
export USE_GKE_GCLOUD_AUTH_PLUGIN=True | |
gcloud container clusters get-credentials cohere-main-gke --region=us-central1 | |
kubectl config get-contexts | |
kubectl config current-context | |
# Install helm | |
- name: Install Helm | |
run: | | |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash | |
# Deploy App -> GKE | |
- name: Deploy Cohere App | |
run: | | |
helm upgrade cohere-app k8s/charts/cohere-app --wait | |
kubectl rollout status deployment/cohere-app | |
kubectl get services -o wide | |
- name: Deploy Postgress Database | |
run: | | |
kubectl apply -f k8s/manifests/postgress.yaml |