From 5f6cffcb5999af3130be12208dc86762b09d3263 Mon Sep 17 00:00:00 2001 From: wjdtkdgns Date: Mon, 20 Nov 2023 09:29:31 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20docker=20login=20=EB=B0=A9=EC=8B=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Deploy.yml | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml index dc881203..9ad1a9e5 100644 --- a/.github/workflows/Deploy.yml +++ b/.github/workflows/Deploy.yml @@ -9,8 +9,6 @@ env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_IMAGE_NAME: ${{ secrets.DOCKERHUB_IMAGE_NAME }} DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} - TEST: ${{ secrets.TEST }} - TEST2: 2222222 permissions: contents: read @@ -35,7 +33,7 @@ jobs: distribution: 'adopt' - name: Grant execute permission for gradlew - run: chmod +x ./gradlew | echo $TEST ${{ secrets.TEST }} $TEST2 + run: chmod +x ./gradlew - name: Build with Gradle @@ -47,18 +45,25 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: $DOCKERHUB_USERNAME - password: $DOCKERHUB_PASSWORD - - name: Docker Build and push - uses: docker/build-push-action@v3 - with: - context: ./ - push: true - tags: $DOCKERHUB_USERNAME/$DOCKERHUB_IMAGE_NAME:${{env.IMAGE_TAG}} + - name: Docker build and push + run: | + docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD + docker build -t $DOCKERHUB_USERNAME/$DOCKERHUB_IMAGE_NAME . + docker push $DOCKERHUB_USERNAME/$DOCKERHUB_IMAGE_NAME:${{env.IMAGE_TAG}} + +# - name: Login to Docker Hub +# uses: docker/login-action@v2 +# with: +# username: $DOCKERHUB_USERNAME +# password: $DOCKERHUB_PASSWORD +# +# - name: Docker Build and push +# uses: docker/build-push-action@v3 +# with: +# context: ./ +# push: true +# tags: $DOCKERHUB_USERNAME/$DOCKERHUB_IMAGE_NAME:${{env.IMAGE_TAG}} deploy: needs: build_and_push