Skip to content

Build and Push Server Docker Image #8

Build and Push Server Docker Image

Build and Push Server Docker Image #8

name: Build and Push Server Docker Image
on:
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Docker Image
run: |
cd src/Server
docker build -t ${{ secrets.DOCKER_USERNAME }}/cbc-api .
docker push ${{ secrets.DOCKER_USERNAME }}/cbc-api:latest