From 84cd2a34e95cc24aeb8734243c1c64d89bc3c233 Mon Sep 17 00:00:00 2001 From: AnnaMihailovna Date: Fri, 25 Aug 2023 20:13:19 +0300 Subject: [PATCH] Add docker build gateway --- .github/workflows/main.yml | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9797a62..f72a6ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -113,10 +113,30 @@ jobs: cd frontend/ npm run test - build_frontend_and_push_to_docker_hub: - name: Push frontend Docker image to DockerHub + # build_frontend_and_push_to_docker_hub: + # name: Push frontend Docker image to DockerHub + # runs-on: ubuntu-latest + # needs: frontend_tests + # steps: + # - name: Check out the repo + # uses: actions/checkout@v3 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v2 + # - name: Login to Docker + # uses: docker/login-action@v2 + # with: + # username: ${{ secrets.DOCKER_USERNAME }} + # password: ${{ secrets.DOCKER_PASSWORD }} + # - name: Push to DockerHub + # uses: docker/build-push-action@v4 + # with: + # context: ./frontend/ + # push: true + # tags: ${{ secrets.DOCKER_USERNAME }}/recipebook_frontend:latest + + build_gateway_and_push_to_docker_hub: + name: Push gateway Docker image to DockerHub runs-on: ubuntu-latest - needs: frontend_tests steps: - name: Check out the repo uses: actions/checkout@v3 @@ -130,8 +150,7 @@ jobs: - name: Push to DockerHub uses: docker/build-push-action@v4 with: - context: ./frontend/ + context: ./infra/ push: true - tags: ${{ secrets.DOCKER_USERNAME }}/recipebook_frontend:latest - - \ No newline at end of file + # Тут вместо username должен быть ваш логин на Docker Hub + tags: ${{ secrets.DOCKER_USERNAME }}/recipebook_nginx:latest