diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 8e84a6ca..eff43d83 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -65,3 +65,23 @@ jobs: run: | pip install pytest pytest + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{secrets.DOCKERHUB_USERNAME}} + password: ${{secrets.DOCKERHUB_ACCESS_TOKEN}} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{secrets.DOCKERHUB_USERNAME}}/fastapi:latest + + - name: Image Digest + run: echo ${{steps.docker_build.outputs.digest}}