Skip to content

Commit 21d84aa

Browse files
committed
Publish docker image to dockerhub
1 parent c6cfbd2 commit 21d84aa

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,35 @@ jobs:
4949
if: success()
5050
env:
5151
DAGSHUB_PAT: ${{ secrets.DAGSHUB_PAT }}
52-
run: python -m unittest tests/test_flask_app.py
52+
run: python -m unittest tests/test_flask_app.py
53+
54+
build-and-deploy:
55+
needs: project-testing
56+
57+
runs-on: ubuntu-latest
58+
59+
steps:
60+
- name: checkout code
61+
uses: actions/checkout@v3
62+
63+
- name: setup python
64+
uses: actions/setup-python@v2
65+
with:
66+
python-version: '3.10'
67+
68+
- name: Login to Dcokerhub
69+
uses: docker/login-action@v2
70+
with:
71+
username: ${{ secrets.DOCKER_HUB_USERNAME}}
72+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN}}
73+
74+
- name: Build Docker Image
75+
if: success()
76+
run: |
77+
docker build -t ${{ secrets.DOCKER_HUB_USERNAME}}/text-classification-using-mlops:latest .
78+
79+
- name: Push Dcoker image to Dockerhub
80+
if: success()
81+
run: |
82+
docker push ${{ secrets.DOCKER_HUB_USERNAME}}/text-classification-using-mlops:latest
83+

0 commit comments

Comments
 (0)