Skip to content

Commit 3b15782

Browse files
committed
Add github workflow.
1 parent ba7e6d3 commit 3b15782

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/containers.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build and Push Docker Images
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
jobs:
8+
docker-build-push:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Login to Docker Hub
15+
uses: docker/login-action@v3
16+
with:
17+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
18+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
19+
20+
- name: Build and push backend
21+
uses: docker/build-push-action@v5
22+
with:
23+
context: ./packages/backend
24+
push: true
25+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/backend:latest
26+
27+
- name: Build and push frontend
28+
uses: docker/build-push-action@v5
29+
with:
30+
context: ./packages/frontend
31+
push: true
32+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/frontend:latest

0 commit comments

Comments
 (0)