Skip to content

Commit 0b2ace9

Browse files
committed
Add CI/CD for Docker
1 parent f3e391f commit 0b2ace9

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Change if your default branch is not "main"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# Checkout your repo
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
# Log in to Docker Hub
18+
- name: Log in to Docker Hub
19+
uses: docker/login-action@v2
20+
with:
21+
username: ${{ secrets.DOCKER_USERNAME }}
22+
password: ${{ secrets.DOCKER_PASSWORD }}
23+
24+
# Build and push
25+
- name: Build and push Docker image
26+
uses: docker/build-push-action@v4
27+
with:
28+
context: .
29+
push: true
30+
tags: |
31+
ansh7845/aims:latest
32+
ansh7845/aims:${{ github.sha }}

0 commit comments

Comments
 (0)