Skip to content

Commit 56ee115

Browse files
committed
add github cicd
1 parent 07df0e0 commit 56ee115

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/ci-cd.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-and-push:
10+
permissions: write-all
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Log in to GHCR
17+
uses: docker/login-action@v2
18+
with:
19+
registry: ghcr.io
20+
username: ${{ github.actor }}
21+
password: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v3
25+
26+
- name: Build and push Docker image
27+
uses: docker/build-push-action@v6
28+
with:
29+
context: .
30+
file: ./Dockerfile
31+
push: true
32+
tags: |
33+
ghcr.io/${{ github.repository_owner }}/mes:latest
34+
ghcr.io/${{ github.repository_owner }}/mes:${{ github.sha }}
35+
platforms: linux/amd64,linux/arm64

0 commit comments

Comments
 (0)