From 9eb49fd7a65314eabf0c27c6a0ba72494490fdc1 Mon Sep 17 00:00:00 2001 From: dikshant-coderabbit Date: Mon, 2 Nov 2026 17:53:30 +0530 Subject: [PATCH] chore: retire production Grafana Cloud Run publisher --- .../deploy-cloud-run-grafana-prod.yaml | 123 ------------------ 1 file changed, 123 deletions(-) delete mode 100644 .github/workflows/deploy-cloud-run-grafana-prod.yaml diff --git a/.github/workflows/deploy-cloud-run-grafana-prod.yaml b/.github/workflows/deploy-cloud-run-grafana-prod.yaml deleted file mode 100644 index 345236c3a9a95..0000000000000 --- a/.github/workflows/deploy-cloud-run-grafana-prod.yaml +++ /dev/null @@ -1,123 +0,0 @@ -name: Deploy Grafana Server Cloud Run on prod - -on: - push: - branches: - - coderabbit_micro_frontend - paths: - - "/**" - workflow_dispatch: - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - env: - PROD_IMAGE: gcr.io/coderabbitprod/grafana-base:latest - PROD2_IMAGE: eu.gcr.io/coderabbitprod2/grafana-base:latest - PROD_WIF_PROVIDER: "projects/616313617167/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider" - PROD_WIF_SERVICE_ACCOUNT: "gha-prod-sa@coderabbitprod.iam.gserviceaccount.com" - PROD2_WIF_PROVIDER: "projects/121321054698/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider" - PROD2_WIF_SERVICE_ACCOUNT: "gha-prod2-sa@coderabbitprod2.iam.gserviceaccount.com" - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - persist-credentials: false - - name: Free disk space - run: | - sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/share/boost - sudo rm -rf "$AGENT_TOOLSDIRECTORY" || true - sudo docker system prune -af || true - df -h - - - uses: docker/setup-buildx-action@v3 - - # - name: Cache Docker layers - # uses: actions/cache@v4 - # with: - # path: /tmp/.buildx-cache - # key: ${{ runner.os }}-${{ github.workflow }}-${{ github.sha }} - # restore-keys: ${{ runner.os }}-${{ github.workflow }}- - - - name: Build image once - uses: docker/build-push-action@v5 - with: - context: . - push: false - load: true - tags: grafana:latest - # cache-from: type=local,src=/tmp/.buildx-cache - # cache-to: type=local,dest=/tmp/.buildx-cache-new - - - name: Authenticate to Google Cloud (prod) with OIDC - id: auth_prod - uses: google-github-actions/auth@v2 - with: - workload_identity_provider: ${{ env.PROD_WIF_PROVIDER }} - service_account: ${{ env.PROD_WIF_SERVICE_ACCOUNT }} - token_format: access_token - - - name: Login to GCR (prod) - uses: docker/login-action@v3 - with: - registry: gcr.io - username: oauth2accesstoken - password: ${{ steps.auth_prod.outputs.access_token }} - - - name: Push image to prod - run: | - docker tag grafana:latest "$PROD_IMAGE" - docker push "$PROD_IMAGE" - - - name: Authenticate to Google Cloud (prod2) with OIDC - id: auth_prod2 - uses: google-github-actions/auth@v2 - with: - workload_identity_provider: ${{ env.PROD2_WIF_PROVIDER }} - service_account: ${{ env.PROD2_WIF_SERVICE_ACCOUNT }} - token_format: access_token - - - name: Login to GCR (prod2) - uses: docker/login-action@v3 - with: - registry: eu.gcr.io - username: oauth2accesstoken - password: ${{ steps.auth_prod2.outputs.access_token }} - - - name: Push image to prod2 - run: | - docker tag grafana:latest "$PROD2_IMAGE" - docker push "$PROD2_IMAGE" - - # - name: Move Docker cache - # run: | - # rm -rf /tmp/.buildx-cache - # mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - # - name: Deploy to Cloud Run - # run: gcloud run deploy grafana-internal --image gcr.io/coderabbitprod/grafana:latest --region us-central1 --allow-unauthenticated --vpc-connector=coderabbit-prod-connector - - - name: Mint mono dispatch token - id: dispatch-token - uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2 - with: - app-id: ${{ secrets.RELEASE_APP_ID }} - private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} - owner: coderabbitai - repositories: mono - permission-contents: write - - - name: Trigger a repository dispatch - env: - GH_TOKEN: ${{ steps.dispatch-token.outputs.token }} - REQUESTED_BY: ${{ github.triggering_actor }} - run: | - set -euo pipefail - jq -n --arg actor "$REQUESTED_BY" --arg sha "$GITHUB_SHA" \ - --arg run_url "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \ - '{event_type: "trigger-grafana-micro-frontend", client_payload: {requested_by: $actor, source_sha: $sha, source_run_url: $run_url}}' \ - | timeout 30s gh api --method POST repos/coderabbitai/mono/dispatches --input -