Skip to content

Commit

Permalink
Fixing docker_build check 2
Browse files Browse the repository at this point in the history
  • Loading branch information
SYusupov committed Sep 23, 2024
1 parent f23cfae commit d9ae899
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,35 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v3
if: ${{ env.TO_BUILD_DOCKER == 'true' }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
if: ${{ env.TO_BUILD_DOCKER == 'true' }}

- name: Login to Docker Hub
uses: docker/login-action@v2
if: ${{ env.TO_BUILD_DOCKER == 'true' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and Push Docker image for Server
if: ${{ env.TO_BUILD_DOCKER == 'true' }}
run: |
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/logicgpt:${{ github.sha }} .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/logicgpt:${{ github.sha }}
- name: Build and Push Docker image for Ollama
if: ${{ env.TO_BUILD_DOCKER == 'true' }}
run: |
cd ollama # Navigate to the Ollama directory
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/ollama:${{ github.sha }} .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/ollama:${{ github.sha }}
# Clean up Docker system after building and pushing the image
- name: Clean up Docker
if: ${{ env.TO_BUILD_DOCKER == 'true' }}
run: |
docker system prune -af --volumes
Expand All @@ -80,7 +86,6 @@ jobs:
name: Download Model and Test API
runs-on: ubuntu-latest
needs: docker_build # comments this if not running docker_build ($TO_BUILD_DOCKER = false)
if: env.TO_BUILD_DOCKER == 'true' # Apply condition at the job level

steps:
- name: Checkout Code
Expand Down

0 comments on commit d9ae899

Please sign in to comment.