You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.3KB

  1. # YOLOv5 🚀 by Ultralytics, GPL-3.0 license
  2. name: Publish Docker Images
  3. on:
  4. push:
  5. branches: [master]
  6. # pull_request:
  7. # branches: [master]
  8. jobs:
  9. docker:
  10. name: Push Docker image to Docker Hub
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Checkout repo
  14. uses: actions/checkout@v3
  15. - name: Set up QEMU
  16. uses: docker/setup-qemu-action@v2
  17. - name: Set up Docker Buildx
  18. uses: docker/setup-buildx-action@v2
  19. - name: Login to Docker Hub
  20. uses: docker/login-action@v2
  21. with:
  22. username: ${{ secrets.DOCKERHUB_USERNAME }}
  23. password: ${{ secrets.DOCKERHUB_TOKEN }}
  24. - name: Build and push CPU image
  25. uses: docker/build-push-action@v3
  26. with:
  27. context: .
  28. file: utils/docker/Dockerfile-cpu
  29. push: true
  30. tags: ultralytics/yolov5:latest-cpu
  31. - name: Build and push GPU image
  32. uses: docker/build-push-action@v3
  33. with:
  34. context: .
  35. file: utils/docker/Dockerfile
  36. push: true
  37. tags: ultralytics/yolov5:latest
  38. #- name: Build and push arm64 image
  39. # uses: docker/build-push-action@v3
  40. # with:
  41. # context: .
  42. # platforms: linux/arm64
  43. # file: utils/docker/Dockerfile-arm64
  44. # push: true
  45. # tags: ultralytics/yolov5:latest-arm64