Skip to content

chore: use workspace dependencies & rename crypto-shared to mpc-crypto #27

chore: use workspace dependencies & rename crypto-shared to mpc-crypto

chore: use workspace dependencies & rename crypto-shared to mpc-crypto #27

name: Build Image & Deploy Nodes to Dev
on:
workflow_dispatch:
pull_request:
types: [closed]
branches:
- develop
paths:
- chain-signatures/**
env:
IMAGE: "europe-west1-docker.pkg.dev/near-cs-dev/multichain-public/multichain-dev"
TAG: ${{ github.sha }}
jobs:
build-mpc-recovery:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: "Checkout mpc-recovery"
- name: Login to GCP Artifact Registry
run: echo "$GOOGLE_CREDENTIALS" | docker login -u _json_key --password-stdin https://europe-west1-docker.pkg.dev
env:
GOOGLE_CREDENTIALS: ${{ secrets.SIG_CREDENTIALS_DEV }}
- name: Build Docker image and push to Google Artifact Registry
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
id: docker-push-tagged
uses: docker/build-push-action@v4
with:
push: true
file: ./Dockerfile
tags: "${{ env.IMAGE }}:${{ env.TAG }},${{ env.IMAGE }}:latest"
deploy:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
needs: build-mpc-recovery
steps:
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.SIG_CREDENTIALS_DEV }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
install_components: 'kubectl,gke-gcloud-auth-plugin'
- name: 'Set project'
run: 'gcloud config set project near-cs-dev'
- name: 'Get container credentials'
run: 'gcloud container clusters get-credentials dev --location europe-west1'
- name: 'Rollout k8s node'
run: 'kubectl rollout restart deployment multichain-dev-11'