docker.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. name: ci
  2. on:
  3. push:
  4. branches:
  5. - 'master'
  6. jobs:
  7. docker:
  8. runs-on: ubuntu-latest
  9. environment: main
  10. steps:
  11. -
  12. name: Checkout
  13. uses: actions/checkout@v3
  14. with:
  15. submodules: recursive
  16. -
  17. name: Set up QEMU
  18. uses: docker/setup-qemu-action@v2
  19. -
  20. name: Set up Docker Buildx
  21. uses: docker/setup-buildx-action@v2
  22. -
  23. name: Login to DockerHub
  24. uses: docker/login-action@v1
  25. with:
  26. username: ${{ secrets.DOCKERHUB_USERNAME }}
  27. password: ${{ secrets.DOCKERHUB_TOKEN }}
  28. -
  29. name: Build and push
  30. uses: docker/build-push-action@v2
  31. with:
  32. context: .
  33. platforms: linux/amd64,linux/arm64/v8
  34. push: true
  35. tags: ftcaplan/matrix-stt-bot:latest
  36. -
  37. name: Build and push
  38. uses: docker/build-push-action@v2
  39. with:
  40. context: .
  41. platforms: linux/amd64,linux/arm64/v8
  42. push: true
  43. tags: ftcaplan/matrix-stt-bot:tiny
  44. build-args: |
  45. "PRELOAD_MODEL=tiny"
  46. -
  47. name: Build and push
  48. uses: docker/build-push-action@v2
  49. with:
  50. context: .
  51. platforms: linux/amd64,linux/arm64/v8
  52. push: true
  53. tags: ftcaplan/matrix-stt-bot:base
  54. build-args: |
  55. "PRELOAD_MODEL=base"
  56. -
  57. name: Build and push
  58. uses: docker/build-push-action@v2
  59. with:
  60. context: .
  61. platforms: linux/amd64,linux/arm64/v8
  62. push: true
  63. tags: ftcaplan/matrix-stt-bot:small
  64. build-args: |
  65. "PRELOAD_MODEL=small"
  66. -
  67. name: Build and push
  68. uses: docker/build-push-action@v2
  69. with:
  70. context: .
  71. platforms: linux/amd64,linux/arm64/v8
  72. push: true
  73. tags: ftcaplan/matrix-stt-bot:medium
  74. build-args: |
  75. "PRELOAD_MODEL=medium"
  76. -
  77. name: Build and push
  78. uses: docker/build-push-action@v2
  79. with:
  80. context: .
  81. platforms: linux/amd64,linux/arm64/v8
  82. push: true
  83. tags: ftcaplan/matrix-stt-bot:large
  84. build-args: |
  85. "PRELOAD_MODEL=large"