From 3574d4dd06ec8dd89be1b513343f2500f8e1fa2c Mon Sep 17 00:00:00 2001 From: NITIN NANGNURKAR Date: Wed, 18 Sep 2024 18:51:48 +0530 Subject: [PATCH] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 44 ++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5a3b3c6..d9c39a7 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -1,4 +1,41 @@ +name: CI/CD Pipeline for Clustering App + +on: + push: + branches: +# - main +# pull_request: +# branches: +# - main + +# jobs: +# build: +# runs-on: ubuntu-latest + +# steps: +# - name: Checkout code +# uses: actions/checkout@v2 + +# - name: Set up Python +# uses: actions/setup-python@v2 +# with: +# python-version: '3.9' + +# - name: Install dependencies +# run: | +# pip install -r requirements.txt + +# - name: Build Docker image +# run: docker build -t clustering-app . + +# - name: Push Docker image to DockerHub +# run: | +# docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} +# docker tag clustering-app your-dockerhub-username/clustering-app:latest +# docker push your-dockerhub-username/clustering-app:latest + + name: CI/CD Pipeline for Clustering App on: @@ -31,6 +68,7 @@ jobs: - name: Push Docker image to DockerHub run: | - docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker tag clustering-app your-dockerhub-username/clustering-app:latest - docker push your-dockerhub-username/clustering-app:latest + echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + docker tag clustering-app ${{ secrets.DOCKER_USERNAME }}/clustering-app:latest + docker push ${{ secrets.DOCKER_USERNAME }}/clustering-app:latest +