Revert "fix(backend): sanitize sensitive data from logging statements… #4
This file contains hidden or 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: Auto Deploy Agent Proxy to GKE (Development) | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - 'backend/agent-proxy/**' | |
| - 'backend/charts/agent-proxy/**' | |
| env: | |
| SERVICE: agent-proxy | |
| REGION: us-central1 | |
| jobs: | |
| deploy: | |
| environment: development | |
| permissions: | |
| contents: 'read' | |
| id-token: 'write' | |
| runs-on: ubuntu-latest | |
| steps: | |
| # To workaround "no space left on device" issue of GitHub-hosted runner | |
| - name: Delete huge unnecessary tools folder | |
| run: rm -rf /opt/hostedtoolcache | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Google Auth | |
| id: auth | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| credentials_json: ${{ secrets.GCP_CREDENTIALS }} | |
| - name: Login to GCR | |
| run: gcloud auth configure-docker | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and Push Docker image | |
| run: | | |
| docker build -t gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}:${GITHUB_SHA::7} -f backend/agent-proxy/Dockerfile . | |
| docker push gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}:${GITHUB_SHA::7} | |
| - name: Connect to GKE cluster | |
| run: | | |
| curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg | |
| echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list | |
| sudo apt-get update && sudo apt-get install google-cloud-cli-gke-gcloud-auth-plugin -y | |
| gcloud container clusters get-credentials ${{ vars.GKE_CLUSTER }} --region ${{ env.REGION }} --project ${{ vars.GCP_PROJECT_ID }} | |
| - name: Deploy Agent Proxy to GKE cluster using Helm | |
| run: | | |
| helm -n ${{ vars.ENV }}-omi-backend upgrade --install ${{ vars.ENV }}-omi-agent-proxy ./backend/charts/agent-proxy -f ./backend/charts/agent-proxy/${{ vars.ENV }}_omi_agent_proxy_values.yaml --set "image.tag=${GITHUB_SHA::7}" | |
| - name: Show Output | |
| run: echo "Agent proxy deployed to development environment" |