Skip to content

Commit

Permalink
added code for pushing docker image into dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
akannan1087 committed Apr 6, 2024
1 parent 40e8220 commit b121e0b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,17 @@ jobs:
- name: Build Docker image
run: |
docker build -t my-docker-repo .
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/pythonapp:latest

0 comments on commit b121e0b

Please sign in to comment.