Bump axios from 1.6.2 to 1.7.4 #313
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 app.like.co | |
on: | |
push: | |
branches: | |
- 'deploy/main' | |
jobs: | |
setup-build-publish-deploy: | |
name: Setup, Build, Publish, and Deploy | |
runs-on: ubuntu-latest | |
environment: production | |
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 }} | |
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: | | |
"GITHUB_SHA=${{ github.sha }}" | |
"GITHUB_REF=${{ github.ref }}" | |
"GA_TRACKING_ID=${{ secrets.GA_TRACKING_ID }}" | |
"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 |