Skip to content

Commit a3114e7

Browse files
author
sonu7552
committed
Add CI Pipeline correctly
1 parent 8359bcb commit a3114e7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/docker-build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI/CD Pipeline - Docker Build
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-and-push:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v3
14+
15+
- name: Login to Docker Hub
16+
uses: docker/login-action@v2
17+
with:
18+
username: ${{ secrets.DOCKER_USERNAME }}
19+
password: ${{ secrets.DOCKER_PASSWORD }}
20+
21+
- name: Build and Push
22+
uses: docker/build-push-action@v4
23+
with:
24+
context: .
25+
push: true
26+
tags: sonu7552/aspnetrun-realworld:latest

0 commit comments

Comments
 (0)