Skip to content

Commit 4baff02

Browse files
committed
ci: publish workflow
1 parent 7f30c04 commit 4baff02

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Push Docker Images
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
build-and-push:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
13+
packages: read
14+
15+
steps:
16+
- name: Checkout repo
17+
uses: actions/checkout@v3
18+
19+
- name: Log in to GitHub Container Registry
20+
uses: docker/login-action@v2
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Build and push server image
27+
uses: docker/build-push-action@v5
28+
with:
29+
context: ./server
30+
file: ./server/Dockerfile
31+
push: true
32+
tags: ghcr.io/${{ github.repository }}/server:latest
33+
34+
- name: Build and push client image
35+
uses: docker/build-push-action@v5
36+
with:
37+
context: ./client
38+
file: ./client/Dockerfile
39+
push: true
40+
tags: ghcr.io/${{ github.repository }}/client:latest

0 commit comments

Comments
 (0)