Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

build-image.yml 2.9 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
  1. name: Buid and Publish Image
  2. on:
  3. push:
  4. branches:
  5. - "main"
  6. pull_request:
  7. branches:
  8. - "*"
  9. paths:
  10. - "Dockerfile.local"
  11. - "entrypoint.sh"
  12. workflow_dispatch:
  13. release:
  14. types: [published, edited]
  15. jobs:
  16. build-and-publish-image-with-db:
  17. runs-on: ubuntu-latest
  18. steps:
  19. - name: Checkout
  20. uses: actions/checkout@v4
  21. - name: Docker metadata
  22. id: meta
  23. uses: docker/metadata-action@v5
  24. with:
  25. images: |
  26. ghcr.io/huggingface/chat-ui-db
  27. tags: |
  28. type=raw,value=latest,enable={{is_default_branch}}
  29. type=semver,pattern={{version}}
  30. type=semver,pattern={{major}}
  31. type=semver,pattern={{major}}.{{minor}}
  32. - name: Set up QEMU
  33. uses: docker/setup-qemu-action@v3
  34. - name: Set up Docker Buildx
  35. uses: docker/setup-buildx-action@v3
  36. - name: Login to GitHub Container Registry
  37. if: github.event_name != 'pull_request'
  38. uses: docker/login-action@v3
  39. with:
  40. registry: ghcr.io
  41. username: ${{ github.repository_owner }}
  42. password: ${{ secrets.GITHUB_TOKEN }}
  43. - name: Build and Publish Docker Image with DB
  44. uses: docker/build-push-action@v5
  45. with:
  46. context: .
  47. file: Dockerfile.local
  48. push: ${{ github.event_name != 'pull_request' }}
  49. tags: ${{ steps.meta.outputs.tags }}
  50. labels: ${{ steps.meta.outputs.labels }}
  51. platforms: linux/amd64,linux/arm64
  52. build-args: |
  53. INCLUDE_DB=true
  54. build-and-publish-image-nodb:
  55. runs-on: ubuntu-latest
  56. steps:
  57. - name: Checkout
  58. uses: actions/checkout@v4
  59. - name: Docker metadata
  60. id: meta
  61. uses: docker/metadata-action@v5
  62. with:
  63. images: |
  64. ghcr.io/huggingface/chat-ui
  65. tags: |
  66. type=raw,value=latest,enable={{is_default_branch}}
  67. type=semver,pattern={{version}}
  68. type=semver,pattern={{major}}
  69. type=semver,pattern={{major}}.{{minor}}
  70. - name: Set up QEMU
  71. uses: docker/setup-qemu-action@v3
  72. - name: Set up Docker Buildx
  73. uses: docker/setup-buildx-action@v3
  74. - name: Login to GitHub Container Registry
  75. if: github.event_name != 'pull_request'
  76. uses: docker/login-action@v3
  77. with:
  78. registry: ghcr.io
  79. username: ${{ github.repository_owner }}
  80. password: ${{ secrets.GITHUB_TOKEN }}
  81. - name: Build and Publish Docker Image without DB
  82. uses: docker/build-push-action@v5
  83. with:
  84. context: .
  85. file: Dockerfile.local
  86. push: ${{ github.event_name != 'pull_request' }}
  87. tags: ${{ steps.meta.outputs.tags }}
  88. labels: ${{ steps.meta.outputs.labels }}
  89. platforms: linux/amd64,linux/arm64
  90. build-args: |
  91. INCLUDE_DB=false
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...