From 871d4599e54347a07c4d708db6aba8520ab3c40f Mon Sep 17 00:00:00 2001 From: gargi mehendale Date: Mon, 12 Dec 2022 12:57:41 +0530 Subject: [PATCH 1/4] merged build and push code for docker image --- .github/workflows/main.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0bb060e..f74f705 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -138,15 +138,21 @@ jobs: with: name: package path: target/ - - name: Docker build - run: | - docker build . -t shubhadainfra/cicd_infracloud:1 - name: Login to DockerHub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Docker push - run: | - docker push shubhadainfra/cicd_infracloud:1 \ No newline at end of file + - name: Build and Push docker image + uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: infracloudinception/cicd_inception:1 + file: {context}/Dockerfile +# - name: Docker build +# run: | +# docker build . -t shubhadainfra/cicd_infracloud:1 +# - name: Docker push +# run: | +# docker push shubhadainfra/cicd_infracloud:1 \ No newline at end of file From f2558c070d301ed1b4db792b0208e0b29cb839be Mon Sep 17 00:00:00 2001 From: gargi mehendale Date: Mon, 12 Dec 2022 13:00:48 +0530 Subject: [PATCH 2/4] merged build and push code for docker image --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f74f705..591de61 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -136,8 +136,8 @@ jobs: - uses: actions/checkout@v2 - uses: actions/download-artifact@v1 with: - name: package - path: target/ + name: package + path: target/ - name: Login to DockerHub uses: docker/login-action@v1 with: @@ -149,7 +149,7 @@ jobs: context: . push: true tags: infracloudinception/cicd_inception:1 - file: {context}/Dockerfile +# file: {context}/Dockerfile # - name: Docker build # run: | # docker build . -t shubhadainfra/cicd_infracloud:1 From d15a796bcc525997144f7b61a2eadac239f9c73b Mon Sep 17 00:00:00 2001 From: gargi mehendale Date: Mon, 12 Dec 2022 13:27:45 +0530 Subject: [PATCH 3/4] changed the repo user and name --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 591de61..3b42b1f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -141,8 +141,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN_INCEPTION }} - name: Build and Push docker image uses: docker/build-push-action@v3 with: From ed899189c2632ed7dd34ff7a009eafdc5dca9c07 Mon Sep 17 00:00:00 2001 From: gargi mehendale Date: Wed, 14 Dec 2022 13:13:54 +0530 Subject: [PATCH 4/4] final commit for build and push merge code --- .github/workflows/main.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3b42b1f..6f6c010 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -149,10 +149,3 @@ jobs: context: . push: true tags: infracloudinception/cicd_inception:1 -# file: {context}/Dockerfile -# - name: Docker build -# run: | -# docker build . -t shubhadainfra/cicd_infracloud:1 -# - name: Docker push -# run: | -# docker push shubhadainfra/cicd_infracloud:1 \ No newline at end of file