Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Ft/52 see profile card of user after match #91

Ft/52 see profile card of user after match

Ft/52 see profile card of user after match #91

Workflow file for this run

name: Client
on:
push:
paths:
- packages/client/**
- packages/common/**
- Dockerfile.client
- .github/workflows/client.yml
tags:
- v*
pull_request:
paths:
- packages/client/**
- packages/common/**
- Dockerfile.client
- .github/workflows/client.yml
workflow_dispatch:
defaults:
run:
shell: bash
env:
SERVICE: client
REGION: us-east1
PROJECT: polytinder
ENVIRONMENT: prod
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19
cache: 'npm'
cache-dependency-path: packages/${{env.SERVICE}}/package-lock.json
- name: Install dependencies
run: |
cd packages/$SERVICE
npm ci
- name: Lint
run: |
cd packages/$SERVICE
npm run lint
- name: JSCPD
run: |
cd packages/$SERVICE
npm run jscpd
build:
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v3
- run: cd packages/$SERVICE
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- name: Build
run: |
docker buildx build \
-f Dockerfile.client \
--platform linux/amd64 \
--target prod \
-t $REGION-docker.pkg.dev/$PROJECT/$PROJECT-$ENVIRONMENT/$SERVICE \
.
- name: Configure Docker
run: gcloud auth configure-docker $REGION-docker.pkg.dev
- name: Push
if: startsWith(github.event.ref, 'refs/tags/')
run: docker push $REGION-docker.pkg.dev/$PROJECT/$PROJECT-$ENVIRONMENT/$SERVICE
deploy:
runs-on: ubuntu-latest
needs: [build]
if: startsWith(github.event.ref, 'refs/tags/')
steps:
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- run: |
gcloud run deploy $PROJECT-$ENVIRONMENT-$SERVICE \
--image=$REGION-docker.pkg.dev/$PROJECT/$PROJECT-$ENVIRONMENT/$SERVICE \
--region=$REGION \
--project=$PROJECT
- run: |
gcloud run services update-traffic $PROJECT-$ENVIRONMENT-$SERVICE \
--region=$REGION \
--project=$PROJECT \
--to-latest