From 38a7714a74fb4ed1478ef4f75b6a20d9adeda8d2 Mon Sep 17 00:00:00 2001 From: ronilpatil Date: Sun, 5 May 2024 22:45:50 +0530 Subject: [PATCH] production model update v1.2 & host container on render --- .github/workflows/cicd.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index 7a2f5b2..5daf20a 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -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" \ No newline at end of file