Skip to content

sarmad deployments

sarmad deployments #13

Workflow file for this run

name: publish
on:
push:
branches:
- sarmad
jobs:
publish-sarmad-docker-image:
runs-on: ubuntu-latest
environment: sarmad
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
NEXT_PUBLIC_SUPABASE_BUCKET_NAME: ${{ secrets.NEXT_PUBLIC_SUPABASE_BUCKET_NAME }}
NEXT_PUBLIC_SUPABASE_SCHEMA: ${{ secrets.NEXT_PUBLIC_SUPABASE_SCHEMA }}
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.NEXT_SUPABASE_SERVICE_ROLE_KEY }}
OPENAI_ASSISTANT_ID: ${{ secrets.OPENAI_ASSISTANT_ID }}
NEXT_PUBLIC_BIZGPT_FRONTEND_LANGUAGE: ${{ vars.NEXT_PUBLIC_BIZGPT_FRONTEND_LANGUAGE}}
NEXT_PUBLIC_CLIENT_BRANDING_NAME: ${{ vars.NEXT_PUBLIC_CLIENT_BRANDING_NAME}}
NEXT_PUBLIC_EMPTY_TEXT_BODY: ${{ vars.NEXT_PUBLIC_EMPTY_TEXT_BODY}}
NEXT_PUBLIC_EMPTY_TEXT_HEADER: ${{ vars.NEXT_PUBLIC_EMPTY_TEXT_HEADER}}
NEXT_PUBLIC_FOOTER_CLIENT_TEXT: ${{ vars.NEXT_PUBLIC_FOOTER_CLIENT_TEXT}}
NEXT_PUBLIC_OUTLINE_ADDRESS: ${{ vars.NEXT_PUBLIC_OUTLINE_ADDRESS}}
NEXT_PUBLIC_TEXT_DIRECTION: ${{ vars.NEXT_PUBLIC_TEXT_DIRECTION}}
NEXT_PUBLIC_USE_EXAMPLE_MESSAGES: ${{ vars.NEXT_PUBLIC_USE_EXAMPLE_MESSAGES}}
NEXT_PUBLIC_USE_FOOTER_CLIENT_TEXT: ${{ vars.NEXT_PUBLIC_USE_FOOTER_CLIENT_TEXT}}
SITE_URL: ${{ vars.SITE_URL}}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }} # Changed from GHCR_TOKEN to GITHUB_TOKEN
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile-general
push: true
tags: |
ghcr.io/chatcrm/bizgpt-frontend-2_0:sarmad
build-args: |
OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
NEXT_PUBLIC_SUPABASE_ANON_KEY=${{ env.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
NEXT_PUBLIC_SUPABASE_BUCKET_NAME=${{ env.NEXT_PUBLIC_SUPABASE_BUCKET_NAME }}
NEXT_PUBLIC_SUPABASE_SCHEMA=${{ env.NEXT_PUBLIC_SUPABASE_SCHEMA }}
NEXT_PUBLIC_SUPABASE_URL=${{ env.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_SUPABASE_SERVICE_ROLE_KEY=${{ env.NEXT_SUPABASE_SERVICE_ROLE_KEY }}
OPENAI_ASSISTANT_ID=${{ env.OPENAI_ASSISTANT_ID }}
NEXT_PUBLIC_BIZGPT_FRONTEND_LANGUAGE=${{ env.NEXT_PUBLIC_BIZGPT_FRONTEND_LANGUAGE }}
NEXT_PUBLIC_CLIENT_BRANDING_NAME=${{ env.NEXT_PUBLIC_CLIENT_BRANDING_NAME }}
NEXT_PUBLIC_EMPTY_TEXT_BODY=${{ env.NEXT_PUBLIC_EMPTY_TEXT_BODY }}
NEXT_PUBLIC_EMPTY_TEXT_HEADER=${{ env.NEXT_PUBLIC_EMPTY_TEXT_HEADER }}
NEXT_PUBLIC_FOOTER_CLIENT_TEXT=${{ env.NEXT_PUBLIC_FOOTER_CLIENT_TEXT }}
NEXT_PUBLIC_OUTLINE_ADDRESS=${{ env.NEXT_PUBLIC_OUTLINE_ADDRESS }}
NEXT_PUBLIC_TEXT_DIRECTION=${{ env.NEXT_PUBLIC_TEXT_DIRECTION }}
NEXT_PUBLIC_USE_EXAMPLE_MESSAGES=${{ env.NEXT_PUBLIC_USE_EXAMPLE_MESSAGES }}
NEXT_PUBLIC_USE_FOOTER_CLIENT_TEXT=${{ env.NEXT_PUBLIC_USE_FOOTER_CLIENT_TEXT }}
SITE_URL=${{ env.SITE_URL }}