docker.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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@v4
  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@v5
  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@v5
  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@v5
  49. with:
  50. context: .
  51. platforms: linux/amd64,linux/arm64/v8
  52. push: true
  53. tags: ftcaplan/matrix-stt-bot:tiny-q5_1
  54. build-args: |
  55. "PRELOAD_MODEL=tiny-q5_1"
  56. -
  57. name: Build and push
  58. uses: docker/build-push-action@v5
  59. with:
  60. context: .
  61. platforms: linux/amd64,linux/arm64/v8
  62. push: true
  63. tags: ftcaplan/matrix-stt-bot:base
  64. build-args: |
  65. "PRELOAD_MODEL=base"
  66. -
  67. name: Build and push
  68. uses: docker/build-push-action@v5
  69. with:
  70. context: .
  71. platforms: linux/amd64,linux/arm64/v8
  72. push: true
  73. tags: ftcaplan/matrix-stt-bot:base-q5_1
  74. build-args: |
  75. "PRELOAD_MODEL=base-q5_1"
  76. -
  77. name: Build and push
  78. uses: docker/build-push-action@v5
  79. with:
  80. context: .
  81. platforms: linux/amd64,linux/arm64/v8
  82. push: true
  83. tags: ftcaplan/matrix-stt-bot:small
  84. build-args: |
  85. "PRELOAD_MODEL=small"
  86. -
  87. name: Build and push
  88. uses: docker/build-push-action@v5
  89. with:
  90. context: .
  91. platforms: linux/amd64,linux/arm64/v8
  92. push: true
  93. tags: ftcaplan/matrix-stt-bot:small-q5_1
  94. build-args: |
  95. "PRELOAD_MODEL=small-q5_1"
  96. -
  97. name: Build and push
  98. uses: docker/build-push-action@v5
  99. with:
  100. context: .
  101. platforms: linux/amd64,linux/arm64/v8
  102. push: true
  103. tags: ftcaplan/matrix-stt-bot:medium-q5_0
  104. build-args: |
  105. "PRELOAD_MODEL=medium-q5_0"
  106. -
  107. name: Build and push
  108. uses: docker/build-push-action@v5
  109. with:
  110. context: .
  111. platforms: linux/amd64,linux/arm64/v8
  112. push: true
  113. tags: ftcaplan/matrix-stt-bot:large-q5_0
  114. build-args: |
  115. "PRELOAD_MODEL=large-q5_0"