@@ -20,85 +20,95 @@ jobs:
20
20
name : Building Search Docker Image
21
21
runs-on : ubuntu-latest
22
22
steps :
23
+ - name : Declare some variables
24
+ shell : bash
25
+ run : |
26
+ echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
27
+
23
28
- name : Checkout the repo
24
29
uses : actions/checkout@v4
25
30
31
+ - name : Setup buildx
32
+ uses : docker/setup-buildx-action@v3
33
+
26
34
- name : Login to Docker Hub
27
35
uses : docker/login-action@v3
28
36
with :
29
37
username : ${{ secrets.DOCKER_USERNAME }}
30
38
password : ${{ secrets.DOCKER_PASSWORD }}
31
39
32
- - name : Declare some variables
33
- shell : bash
34
- run : |
35
- echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
36
40
37
41
- name : Build and push Docker image
38
42
uses : docker/build-push-action@v5
39
43
with :
40
- cache-from : type=registry,ref=arguflow/search:latest
41
- cache-to : type=inline
44
+ cache-from : type=gha
45
+ cache-to : type=gha,mode=max
42
46
context : search/
43
47
file : ./search/Dockerfile
44
48
push : true
45
- tags : arguflow/search:latest,arguflow/search:${{ env.sha_short }}
49
+ tags : arguflow/search:latest
46
50
labels : ${{ steps.meta.outputs.labels }}
47
51
48
52
build_chat :
49
53
name : Building Chat Docker Image
50
54
runs-on : ubuntu-latest
51
55
steps :
56
+ - name : Declare some variables
57
+ shell : bash
58
+ run : |
59
+ echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
60
+
52
61
- name : Checkout the repo
53
62
uses : actions/checkout@v4
54
63
64
+ - name : Setup buildx
65
+ uses : docker/setup-buildx-action@v3
66
+
55
67
- name : Login to Docker Hub
56
68
uses : docker/login-action@v3
57
69
with :
58
70
username : ${{ secrets.DOCKER_USERNAME }}
59
71
password : ${{ secrets.DOCKER_PASSWORD }}
60
72
61
- - name : Declare some variables
62
- shell : bash
63
- run : |
64
- echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
65
-
66
73
- name : Build and push Docker image
67
74
uses : docker/build-push-action@v5
68
75
with :
69
- cache-from : type=registry,ref=arguflow/chat:latest
70
- cache-to : type=inline
76
+ cache-from : type=gha
77
+ cache-to : type=gha,mode=max
71
78
context : chat/
72
79
file : ./chat/Dockerfile
73
80
push : true
74
- tags : arguflow/chat:latest,arguflow/chat:${{ env.sha_short }}
81
+ tags : arguflow/chat:latest
75
82
labels : ${{ steps.meta.outputs.labels }}
76
83
77
84
build_server :
78
85
name : Building Server Docker Image
79
86
runs-on : ubuntu-latest
80
87
steps :
88
+ - name : Declare some variables
89
+ shell : bash
90
+ run : |
91
+ echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
92
+
81
93
- name : Checkout the repo
82
94
uses : actions/checkout@v4
83
95
96
+ - name : Setup buildx
97
+ uses : docker/setup-buildx-action@v3
98
+
84
99
- name : Login to Docker Hub
85
100
uses : docker/login-action@v3
86
101
with :
87
102
username : ${{ secrets.DOCKER_USERNAME }}
88
103
password : ${{ secrets.DOCKER_PASSWORD }}
89
104
90
- - name : Declare some variables
91
- shell : bash
92
- run : |
93
- echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
94
-
95
105
- name : Build and push Docker image
96
106
uses : docker/build-push-action@v5
97
107
with :
98
- cache-from : type=registry,ref=arguflow/server:latest
99
- cache-to : type=inline
108
+ cache-from : type=gha
109
+ cache-to : type=gha,mode=max
100
110
context : server/
101
111
file : ./server/Dockerfile
102
112
push : true
103
- tags : arguflow/server:latest,arguflow/server:${{ env.sha_short }}
113
+ tags : arguflow/server:latest
104
114
labels : ${{ steps.meta.outputs.labels }}
0 commit comments