Merge pull request #3 from mozzy11/main #2
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 Deploy Rag and custom Ollama Docker Images | |
on: | |
push: | |
branches: | |
- main # Trigger the workflow on pushes to the main branch | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
# Set up Docker Buildx | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
# Log in to Docker Hub | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ vars.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# Build and push Docker image | |
- name: Build and Push custom Ollama Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ollama | |
push: true | |
tags: ${{ vars.DOCKERHUB_USERNAME }}/ollama:latest | |
# Build and push the Docker image | |
- name: Build and Push Rag app Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: ${{ vars.DOCKERHUB_USERNAME }}/rag-app:latest |