From 7f912edace0d2cfb71b8fe9d692964036ef63e86 Mon Sep 17 00:00:00 2001 From: Jay Date: Sat, 6 Jan 2024 00:30:07 -0500 Subject: [PATCH] Create docker-image.yml --- .github/workflows/docker-image.yml | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..0e4876f --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,33 @@ +name: Docker Image CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + backend-build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout backend code + uses: actions/checkout@v3 + with: + path: 'backend' + - name: Build the Docker image for backend + run: docker build ./backend --file backend/Dockerfile --tag backend-image-name:$(date +%s) + + frontend-build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout frontend code + uses: actions/checkout@v3 + with: + path: 'frontend' + - name: Build the Docker image for frontend + run: docker build ./frontend --file frontend/Dockerfile --tag frontend-image-name:$(date +%s)