We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0bfabe5 commit a89cfcfCopy full SHA for a89cfcf
1 file changed
.github/workflows/ci.yml
@@ -27,4 +27,24 @@ jobs:
27
- name: run tests with pytest
28
run: |
29
pip install pytest
30
- pytest
+ pytest
31
+
32
+ - name: Set up Docker Buildx
33
+ uses: docker/setup-buildx-action@v3
34
35
+ - name: Login to Docker Hub
36
+ uses: docker/login-action@v3
37
+ with:
38
+ username: ${{ secrets.DOCKER_HUB_USERNAME }}
39
+ password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
40
41
+ - name: Build and push Docker image (optimized)
42
+ uses: docker/build-push-action@v5
43
44
+ context: .
45
+ push: true
46
+ tags: |
47
+ ${{ secrets.DOCKER_HUB_USERNAME }}/fastapi-app:latest
48
+ ${{ secrets.DOCKER_HUB_USERNAME }}/fastapi-app:${{ github.sha }}
49
+ cache-from: type=gha
50
+ cache-to: type=gha,mode=max
0 commit comments