feat(staking_service): add system bucket v2 #84
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 gke | |
on: | |
push: | |
branches: [ main ] | |
permissions: | |
contents: read | |
pull-requests: read | |
packages: write | |
id-token: write | |
env: | |
PROJECT_ID: iotex-servers | |
GKE_CLUSTER: iotex-prod-gcp-2 | |
GKE_ZONE: us-central1 | |
jobs: | |
deploy: | |
name: deploy to gke | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: | | |
iotexdev/iotex-analyser-api | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: iotexdev/iotex-analyser-api:latest | |
- id: 'auth' | |
name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v0' | |
with: | |
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' | |
- name: Set up GKE credentials | |
uses: google-github-actions/get-gke-credentials@v0 | |
with: | |
cluster_name: ${{ env.GKE_CLUSTER }} | |
location: ${{ env.GKE_ZONE }} | |
- name: Deploy | |
run: |- | |
kubectl rollout restart statefulset iotex-analyser-api | |
kubectl rollout restart statefulset iotex-analyser-api-testnet |