Skip to content

Commit

Permalink
production model update v1.2 & host container on render
Browse files Browse the repository at this point in the history
  • Loading branch information
ronylpatil committed May 5, 2024
1 parent 0f5411b commit 38a7714
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,28 @@ jobs:

- name: Build Docker Image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/wineqcicd:v1.1 .
docker build -t ${{ secrets.DOCKER_USERNAME }}/wineqcicd:v1.2 .
- name: Log-in to Docker Hub
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}

- name: Push Docker Img # push the previously built img to dockerhub
run: docker push ${{ secrets.DOCKER_USERNAME }}/wineqcicd:v1.1
run: docker push ${{ secrets.DOCKER_USERNAME }}/wineqcicd:v1.2

deploy:
needs: build_push_docker_image
runs-on: ubuntu-latest

inputs:
image_tag: v1.2

steps:
- name: Deploy the container
env:
deploy_url: ${{ secrets.DEPLOY_HOOK }}
IMAGE_NAME: ${{ secrets.DOCKER_USERNAME }}/wineqcicd:v1.2
run: |
curl "$deploy_url"
IMAGE_TAG=${{ inputs.image_tag }} # Use the manually provided tag
IMAGE_URL="$IMAGE_NAME:$IMAGE_TAG"
curl -X POST -d "image_url=$IMAGE_URL" "$deploy_url"

0 comments on commit 38a7714

Please sign in to comment.