Skip to content

Commit e2d9e1e

Browse files
committed
Added CI for docker image
1 parent 04b68c1 commit e2d9e1e

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Trigger on tags'
7+
8+
jobs:
9+
build-and-push:
10+
runs-on: ubuntu-latest
11+
steps:
12+
# Step 1: Checkout the repository code
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
# Step 2: Set up QEMU for multi-platform builds
17+
- name: Set up QEMU
18+
uses: docker/setup-qemu-action@v2
19+
with:
20+
platforms: linux/amd64,linux/arm64
21+
22+
# Step 3: Set up Docker Buildx
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v2
25+
26+
# Step 4: Log in to Docker Hub
27+
- name: Log in to Docker Hub
28+
uses: docker/login-action@v2
29+
with:
30+
username: ${{ secrets.DOCKERHUB_USERNAME }}
31+
password: ${{ secrets.DOCKERHUB_TOKEN }}
32+
33+
# Step 5: Build and push the Docker image
34+
- name: Build and push Docker image
35+
uses: docker/build-push-action@v4
36+
with:
37+
context: .
38+
platforms: linux/amd64,linux/arm64
39+
push: true
40+
build-args: --progress=plain
41+
tags: setavenger/blindbit-oracle:${{ github.ref_name }}
42+
43+

0 commit comments

Comments
 (0)