Skip to content

Commit

Permalink
deploy: checking - 1 ci-cd
Browse files Browse the repository at this point in the history
  • Loading branch information
BAHIRABDULLA committed Jan 10, 2025
1 parent 587cafb commit 0df19a6
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,22 @@ jobs:

- name: Build and push Docker image for ${{ matrix.service }}
run: |
docker build -t bahirk/vision-${{ matrix.service | toLowerCase }}:latest ./services/${{ matrix.service }}
docker push bahirk/vision-${{ matrix.service | toLowerCase }}:latest
SERVICE_NAME=$(echo "${{ matrix.service }}" | tr '[:upper:]' '[:lower:]')
docker build -t bahirk/vision-$SERVICE_NAME:latest ./services/${{ matrix.service }}
docker push bahirk/vision-$SERVICE_NAME:latest
deploy:
runs-on: ubuntu-latest
needs: build-and-push
strategy:
matrix:
service:
- user-service
- mentor-service
- admin-service
- course-service
- payment-service
- messaging-service
- userService
- mentorService
- adminService
- courseService
- paymentService
- messagingService
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -61,5 +62,6 @@ jobs:

- name: Deploy ${{ matrix.service }}
run: |
kubectl set image deployment/${{ matrix.service }} ${{ matrix.service }}=bahirk/vision-${{ matrix.service }}:latest
kubectl rollout status deployment/${{ matrix.service }}
SERVICE_NAME=$(echo "${{ matrix.service }}" | tr '[:upper:]' '[:lower:]')
kubectl set image deployment/${SERVICE_NAME} ${SERVICE_NAME}=bahirk/vision-${SERVICE_NAME}:latest
kubectl rollout status deployment/${SERVICE_NAME}

0 comments on commit 0df19a6

Please sign in to comment.