Skip to content

Commit dc39f41

Browse files
committed
Add CI/CD
1 parent f774384 commit dc39f41

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/docker-build.yml

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

0 commit comments

Comments
 (0)