Skip to content

Commit

Permalink
enhance pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-moha committed Oct 22, 2024
1 parent bcd6cb8 commit 281e3e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
28 changes: 9 additions & 19 deletions .github/workflows/ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,16 @@ jobs:
publish-sarmad-docker-image:
runs-on: ubuntu-latest
environment: sarmad
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@v2

- name: Login to GitHub Container Registry

uses: docker/login-action@v1

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
registry: ghcr.io

username: ${{ github.actor }}

password: ${{ secrets.GHCR_TOKEN }}

- name: Build the Sarmad Docker image

run: |
docker build . --tag ghcr.io/chatcrm/bizgpt-frontend-2_0:sarmad
docker run ghcr.io/chatcrm/bizgpt-frontend-2_0:sarmad
docker push ghcr.io/chatcrm/bizgpt-frontend-2_0:sarmad
context: .
push: true
tags: ghcr.io/chatcrm/bizgpt-frontend-2_0:sarmad
build-args: |
OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Use Node.js 20 as the base image
FROM node:20-alpine AS base

ARG OPENAI_API_KEY
ENV OPENAI_API_KEY=$OPENAI_API_KEY

# Install pnpm
RUN npm install -g pnpm

Expand Down

0 comments on commit 281e3e9

Please sign in to comment.