Skip to content

Commit

Permalink
Publish docker image to dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
2003HARSH committed Nov 9, 2024
1 parent c6cfbd2 commit 21d84aa
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,35 @@ jobs:
if: success()
env:
DAGSHUB_PAT: ${{ secrets.DAGSHUB_PAT }}
run: python -m unittest tests/test_flask_app.py
run: python -m unittest tests/test_flask_app.py

build-and-deploy:
needs: project-testing

runs-on: ubuntu-latest

steps:
- name: checkout code
uses: actions/checkout@v3

- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Login to Dcokerhub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME}}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN}}

- name: Build Docker Image
if: success()
run: |
docker build -t ${{ secrets.DOCKER_HUB_USERNAME}}/text-classification-using-mlops:latest .
- name: Push Dcoker image to Dockerhub
if: success()
run: |
docker push ${{ secrets.DOCKER_HUB_USERNAME}}/text-classification-using-mlops:latest

0 comments on commit 21d84aa

Please sign in to comment.