Skip to content

πŸ› Fix jwt permissions not signed #353

πŸ› Fix jwt permissions not signed

πŸ› Fix jwt permissions not signed #353

name: Deploy to app.rinkeby.like.co
on:
push:
branches:
- 'deploy/rinkeby'
jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
environment: rinkeby
env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }}
GKE_ZONE: ${{ secrets.GKE_ZONE }}
DEPLOYMENT_NAME: ${{ secrets.DEPLOYMENT_NAME }}
IMAGE: ${{ secrets.GCR_IMAGE }}
IS_TESTNET: 'TRUE'
steps:
- name: Checkout
uses: actions/checkout@master
# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
with:
service_account_key: ${{ secrets.GKE_SA_KEY }}
project_id: ${{ secrets.GKE_PROJECT }}
# Configure Docker to use the gcloud command-line tool as a credential helper for authentication
- run: |-
gcloud --quiet auth configure-docker
# Get the GKE credentials so we can deploy to the cluster
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: ${{ env.GKE_CLUSTER }}
location: ${{ env.GKE_ZONE }}
credentials: ${{ secrets.GKE_SA_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: |
us.gcr.io/${{ env.PROJECT_ID }}/${{ env.IMAGE }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
"IS_TESTNET=${{ env.IS_TESTNET }}"
"GITHUB_SHA=${{ github.sha }}"
"GITHUB_REF=${{ github.ref }}"
"RELEASE=${{ github.sha }}"
"SENTRY_DSN=${{ vars.SENTRY_DSN }}"
"SENTRY_ORG=${{ vars.SENTRY_ORG }}"
"SENTRY_PROJECT=${{ vars.SENTRY_PROJECT }}"
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
# Deploy the Docker image to the GKE cluster
- name: Deploy
run: |-
kubectl patch deployment $DEPLOYMENT_NAME -p '{"spec":{"template":{"spec":{"containers":[{"name": "'"$IMAGE"'","image":"us.gcr.io/'"$PROJECT_ID"'/'"$IMAGE"':'"$GITHUB_SHA"'"}]}}}}'
kubectl rollout status deployment/$DEPLOYMENT_NAME