Skip to content

Commit 5ece450

Browse files
committed
Pushing image to docker hub in CICD
1 parent a8be60f commit 5ece450

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/github-actions-CI-CD.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,20 @@ jobs:
3939
- name: install all dependencies
4040
run: pip install -r requirements.txt
4141
- name: Testing with pytest
42-
run: pytest -v -s
42+
run: pytest -v -s
43+
44+
- name: Login to Docker Hub
45+
uses: docker/login-action@v3
46+
with:
47+
username: ${{ secrets.DOCKERHUB_USERNAME }}
48+
password: ${{ secrets.DOCKERHUB_TOKEN }}
49+
- name: Set up QEMU
50+
uses: docker/setup-qemu-action@v3
51+
- name: Set up Docker Buildx
52+
uses: docker/setup-buildx-action@v3
53+
- name: Build and push
54+
uses: docker/build-push-action@v6
55+
with:
56+
context: .
57+
push: true
58+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/fastapi_cicd:latest

0 commit comments

Comments
 (0)