added generic response for conversation starter. #122
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: Docker Build Verification | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 40 | |
steps: | |
- uses: actions/checkout@v2 | |
# - name: Clean up disk space | |
# run: | | |
# docker system prune -af | |
# sudo apt-get clean | |
# sudo rm -rf /var/lib/apt/lists/* | |
# sudo rm -rf /opt/hostedtoolcache | |
# - name: Free up disk space | |
# run: | | |
# curl -o free_disk_space.sh https://raw.githubusercontent.com/apache/flink/02d30ace69dc18555a5085eccf70ee884e73a16e/tools/azure-pipelines/free_disk_space.sh | |
# chmod +x free_disk_space.sh | |
# ./free_disk_space.sh | |
# - name: Cache Docker images | |
# uses: actions/cache@v2 | |
# with: | |
# path: /tmp/docker-images | |
# key: docker-images-${{ hashFiles('docker-compose.yaml') }} | |
# - name: Pull and save Docker images | |
# if: steps.cache.outputs.cache-hit != 'true' | |
# run: | | |
# docker pull samagragovernance/postgres:latest-pg15 | |
# docker pull hasura/graphql-engine:latest | |
# docker pull ghcr.io/samagra-development/ai-tools:main | |
# mkdir -p /tmp/docker-images | |
# docker save -o /tmp/docker-images/images.tar samagragovernance/postgres:latest-pg15 hasura/graphql-engine:latest ghcr.io/samagra-development/ai-tools:main | |
# - name: Load cached Docker images | |
# run: | | |
# if [ -d /tmp/docker-images ]; then | |
# docker load < /tmp/docker-images/images.tar | |
# fi | |
- name: Run other services | |
run: | | |
docker-compose -f docker-compose.ci.yaml build --build-arg ENV="CI" | |
docker-compose -f docker-compose.ci.yaml up -d | |
docker-compose -f docker-compose.ci.yaml ps | |
docker-compose -f docker-compose.ci.yaml logs | |
env: | |
ENV: CI, | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
AUTH_HEADER: ${{ secrets.AUTH_HEADER }} | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} | |
POSTHOG_BASE_URL: ${{ secrets.POSTHOG_BASE_URL }} | |
POSTHOG_BATCH_SIZE: ${{ secrets.POSTHOG_BATCH_SIZE }} | |
POSTHOG_FLUSH_INTERVAL: ${{ secrets.POSTHOG_FLUSH_INTERVAL }} | |
AI_TOOLS_BASE_URL: ${{ secrets.AI_TOOLS_BASE_URL }} | |
AI_TOOLS_AUTH_HEADER: ${{ secrets.AI_TOOLS_AUTH_HEADER }} | |
TRANSPORT_SOCKET_URL: ${{ secrets.TRANSPORT_SOCKET_URL }} | |
# - name: Run Prisma commands | |
# run: | | |
# docker exec service npx prisma generate | |
# docker exec service npx prisma migrate deploy | |
# timeout-minutes: 5 | |
- run: docker ps | |
- name: Wait for Service to start | |
run: while ! curl -s localhost:8081; do sleep 1; done | |
timeout-minutes: 1 |