Skip to content

Commit

Permalink
Update cicd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
akannan1087 authored Apr 8, 2024
1 parent 4336cf5 commit 9517298
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
- name: Build and push
env:
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/mypythonapp:${IMAGE_TAG} .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/mypythonapp:${IMAGE_TAG}
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/mypythonapp:${IMAGE_TAG}

0 comments on commit 9517298

Please sign in to comment.