From fe3d49e5c45f8784f29b6c9c458cff20c3038718 Mon Sep 17 00:00:00 2001 From: "konu (Jin Geonwoo)" Date: Fri, 17 May 2024 17:15:40 +0900 Subject: [PATCH] =?UTF-8?q?[Setting]=20=EA=B9=83=ED=97=99=20=EC=95=A1?= =?UTF-8?q?=EC=85=98=20=ED=8C=8C=EC=9D=BC=20=EB=82=B4=20=EB=8F=84=EC=BB=A4?= =?UTF-8?q?=20=EB=B3=80=EC=88=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/github-actions.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 6f14fb6..2b71ca8 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -50,19 +50,20 @@ jobs: run: | ./planfit/gradlew build --project-dir ./planfit -x test - # docker variables debugging - - name: check docker variables - run: | - echo "DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}" - echo "DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}" + # docker login + - name: Docker login + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + # docker build & push to production - name: Docker build & push to prod if: contains(github.ref, 'main') run: | - docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker build -f Dockerfile -t ${{ secrets.DOCKER_USERNAME }}/planfit:latest . - docker push ${{ secrets.DOCKER_USERNAME }}/planfit:latest + docker build -f Dockerfile -t ${{ secrets.DOCKERHUB_USERNAME }}/planfit . + docker push ${{ secrets.DOCKERHUB_USERNAME }}/planfit ## deploy to production - name: Deploy to prod