From a28a332ce0e0060a9bf59642a909dd636830ce6a Mon Sep 17 00:00:00 2001 From: jhj0517 <97279763+jhj0517@users.noreply.github.com> Date: Wed, 27 Nov 2024 23:39:20 +0900 Subject: [PATCH] Add CD pipeline for the backend --- .github/workflows/publish-docker.yml | 35 +++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index de17af2..7e640fa 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -6,7 +6,7 @@ on: - master jobs: - build-and-push: + build-and-push-webui: runs-on: ubuntu-latest steps: @@ -38,3 +38,36 @@ jobs: - name: Log out of Docker Hub run: docker logout + + build-and-push-backend: + runs-on: ubuntu-latest + + steps: + - name: Clean up space for action + run: rm -rf /opt/hostedtoolcache + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./backend/Dockerfile + push: true + tags: ${{ secrets.DOCKER_USERNAME }}/whisper-webui-backend:latest + + - name: Log out of Docker Hub + run: docker logout