Skip to content

Commit

Permalink
Add CD pipeline for the backend
Browse files Browse the repository at this point in the history
  • Loading branch information
jhj0517 committed Nov 27, 2024
1 parent ab90fba commit a28a332
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master

jobs:
build-and-push:
build-and-push-webui:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -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

0 comments on commit a28a332

Please sign in to comment.