Skip to content

Fix: Updated CI/CD #342

Fix: Updated CI/CD

Fix: Updated CI/CD #342

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and Push Main Core App
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/app-core:${{ github.sha }} -f ./services/app/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/app-core:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/app-core:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/app-core:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/app-core:latest
- name: Build and Push Base Worker
run: |
cd opol/stack/flows
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/worker-base:${{ github.sha }} -f ./Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/worker-base:${{ github.sha }}
- name: Build and Push Embedding Flow
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/flow-embedding:${{ github.sha }} -f ./flows/embeddings/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/flow-embedding:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/flow-embedding:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/flow-embedding:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/flow-embedding:latest
- name: Build and Push Scraper Flow
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/flow-scraper:${{ github.sha }} -f ./flows/scraping/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/flow-scraper:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/flow-scraper:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/flow-scraper:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/flow-scraper:latest
- name: Build and Push Entities Flow
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/flow-entities:${{ github.sha }} -f ./flows/entities/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/flow-entities:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/flow-entities:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/flow-entities:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/flow-entities:latest
- name: Build and Push Geocoding Flow
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/flow-geocoding:${{ github.sha }} -f ./flows/geocoding/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/flow-geocoding:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/flow-geocoding:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/flow-geocoding:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/flow-geocoding:latest
- name: Build and Push Orchestration Flow
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/flow-orchestration:${{ github.sha }} -f ./flows/orchestration/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/flow-orchestration:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/flow-orchestration:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/flow-orchestration:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/flow-orchestration:latest
- name: Build and Push Classification Flow
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/flow-classification:${{ github.sha }} -f ./flows/classification/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/flow-classification:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/flow-classification:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/flow-classification:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/flow-classification:latest
# - name: Build and Push Custom LiteLLM
# run: |
# cd opol/stack
# docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/litellm:${{ github.sha }} -f ./services/litellm/Dockerfile .
# docker push ${{ secrets.DOCKERHUB_USERNAME }}/litellm:${{ github.sha }}
# docker tag ${{ secrets.DOCKERHUB_USERNAME }}/litellm:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/litellm:latest
# docker push ${{ secrets.DOCKERHUB_USERNAME }}/litellm:latest
- name: Build and Push Entity Service
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/service-entities:${{ github.sha }} -f ./services/service-entities/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/service-entities:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/service-entities:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/service-entities:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/service-entities:latest
- name: Build and Push Geo Service
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/service-geo:${{ github.sha }} -f ./services/service-geocoding/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/service-geo:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/service-geo:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/service-geo:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/service-geo:latest
- name: Build and Push Embedding Service
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/service-embeddings:${{ github.sha }} -f ./services/service-embeddings/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/service-embeddings:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/service-embeddings:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/service-embeddings:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/service-embeddings:latest
- name: Build and Push Postgres Service
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/service-postgres:${{ github.sha }} -f ./services/service-postgres/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/service-postgres:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/service-postgres:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/service-postgres:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/service-postgres:latest
- name: Build and Push Scraper Service
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/service-scraping:${{ github.sha }} -f ./services/service-scraping/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/service-scraping:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/service-scraping:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/service-scraping:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/service-scraping:latest