feat: use auto actions to expose api #38
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: Build and Push Docker Image | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies & build Nest app | |
run: | | |
npm install -g pnpm | |
pnpm install | |
npm run build | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: jadenxiong/chat-query-backend:latest | |
build-args: | | |
OPEN_AI_API_KEY=${{ secrets.OPEN_AI_API_KEY }} | |
MODEL_NAME=${{ secrets.MODEL_NAME }} | |
BASE_URL=${{ secrets.BASE_URL }} | |
DB_HOST=${{ secrets.DB_HOST }} | |
DB_PORT=${{ secrets.DB_PORT }} |