Internal LB #1
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: Deploy to Dev environment. | |
on: | |
pull_request: | |
branches: | |
- develop | |
env: | |
PROJECT_DEV: "pagoda-discovery-platform-dev" | |
REGION: "us-east1" | |
IMAGE: us-east1-docker.pkg.dev/pagoda-discovery-platform-dev/mpc-recovery/mpc-recovery-dev:${{ github.sha }} | |
PR_NUMBER: ${{ github.event.number }} | |
jobs: | |
build-mpc-recovery: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
name: "Checkout mpc-recovery" | |
- name: Login to Artifact Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGION }}-docker.pkg.dev | |
username: _json_key | |
password: ${{ secrets.GCP_CREDENTIALS_DEV }} | |
- name: Build Docker image and push to Google Artifact Registry | |
id: docker-push-tagged | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
file: ./Dockerfile | |
tags: "${{ env.IMAGE }}:${{ github.sha }}" | |
deploy-mpc-recovery-dev: | |
if: contains(github.event.pull_request.labels.*.name, 'deploy-test') | |
runs-on: ubuntu-latest | |
needs: build-mpc-recovery | |
env: | |
name: DEV | |
steps: | |
- uses: actions/checkout@v3 | |
name: "Checkout mpc-recovery" | |
- name: "Authenticate to GCloud" | |
uses: "google-github-actions/auth@v1" | |
with: | |
credentials_json: "${{ secrets.GCP_CREDENTIALS_DEV }}" | |
- name: Deploy leader to Cloud Run | |
id: deploy-leader | |
uses: google-github-actions/deploy-cloudrun@v1 | |
with: | |
image: "${{ env.IMAGE }}:${{ github.sha }}" | |
service: mpc-recovery-leader-dev | |
region: us-east1 | |
project_id: "${{ env.PROJECT_DEV }}" | |
tag: "pr-${{ github.event.number }}" | |
- name: Deploy Signer to Cloud Run | |
id: deploy-signer-0 | |
uses: google-github-actions/deploy-cloudrun@v1 | |
with: | |
image: "${{ env.IMAGE }}:${{ github.sha }}" | |
service: mpc-recovery-signer-0-dev | |
region: us-east1 | |
project_id: "${{ env.PROJECT_DEV }}" | |
tag: "pr-${{ github.event.number }}" | |
- name: Deploy Signer to Cloud Run | |
id: deploy-signer-1 | |
uses: google-github-actions/deploy-cloudrun@v1 | |
with: | |
image: "${{ env.IMAGE }}:${{ github.sha }}" | |
service: mpc-recovery-signer-1-dev | |
region: us-east1 | |
project_id: "${{ env.PROJECT_DEV }}" | |
tag: "pr-${{ github.event.number }}" | |
- name: Deploy Signer to Cloud Run | |
id: deploy-signer-2 | |
uses: google-github-actions/deploy-cloudrun@v1 | |
with: | |
image: "${{ env.IMAGE }}:${{ github.sha }}" | |
service: mpc-recovery-signer-2-dev | |
region: us-east1 | |
project_id: "${{ env.PROJECT_DEV }}" | |
tag: "pr-${{ github.event.number }}" |