Skip to content

Commit d9a793d

Browse files
authored
Create main.yml
1 parent 0a592b1 commit d9a793d

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/main.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
7+
jobs:
8+
docker:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
include:
13+
- image: amolshejole/OpenSignMongoDB
14+
dockerfile: Dockerfile
15+
steps:
16+
-
17+
name: Checkout
18+
uses: actions/checkout@v3
19+
-
20+
name: Login to Docker Hub
21+
uses: docker/login-action@v2
22+
with:
23+
username: ${{ secrets.DOCKERHUB_USERNAME }}
24+
password: ${{ secrets.DOCKERHUB_TOKEN }}
25+
-
26+
name: Extract metadata (tags, labels) for Docker
27+
id: meta
28+
uses: docker/metadata-action@v4
29+
with:
30+
images: ${{ matrix.image }}
31+
-
32+
name: Debug - List files
33+
run: ls -R # Adjust the path as needed
34+
-
35+
name: Build and push
36+
uses: docker/build-push-action@v4
37+
with:
38+
context: .
39+
file: ${{ matrix.dockerfile }}
40+
push: true
41+
tags: ${{ steps.meta.outputs.tags }}
42+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)