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.4KB

  1. # YOLOv5 🚀 by Ultralytics, GPL-3.0 license
  2. # Builds ultralytics/yolov5:latest images on DockerHub https://hub.docker.com/r/ultralytics/yolov5
  3. name: Publish Docker Images
  4. on:
  5. push:
  6. branches: [ master ]
  7. jobs:
  8. docker:
  9. if: github.repository == 'ultralytics/yolov5'
  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 arm64 image
  25. uses: docker/build-push-action@v3
  26. with:
  27. context: .
  28. platforms: linux/arm64
  29. file: utils/docker/Dockerfile-arm64
  30. push: true
  31. tags: ultralytics/yolov5:latest-arm64
  32. - name: Build and push CPU image
  33. uses: docker/build-push-action@v3
  34. with:
  35. context: .
  36. file: utils/docker/Dockerfile-cpu
  37. push: true
  38. tags: ultralytics/yolov5:latest-cpu
  39. - name: Build and push GPU image
  40. uses: docker/build-push-action@v3
  41. with:
  42. context: .
  43. file: utils/docker/Dockerfile
  44. push: true
  45. tags: ultralytics/yolov5:latest