|
|
@@ -48,6 +48,16 @@ jobs:
|
|
48
|
48
|
- uses: jdx/mise-action@v3
|
|
49
|
49
|
name: Install mise
|
|
50
|
50
|
|
|
|
51
|
+ - name: Cache Go modules and build
|
|
|
52
|
+ uses: actions/cache@v5
|
|
|
53
|
+ with:
|
|
|
54
|
+ path: |
|
|
|
55
|
+ ~/go/pkg/mod
|
|
|
56
|
+ ~/.cache/go-build
|
|
|
57
|
+ key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
|
|
|
58
|
+ restore-keys: |
|
|
|
59
|
+ ${{ runner.os }}-go-
|
|
|
60
|
+
|
|
51
|
61
|
- name: Run tests
|
|
52
|
62
|
run: mise tasks run covtest
|
|
53
|
63
|
|
|
|
@@ -69,6 +79,16 @@ jobs:
|
|
69
|
79
|
- uses: jdx/mise-action@v3
|
|
70
|
80
|
name: Install mise
|
|
71
|
81
|
|
|
|
82
|
+ - name: Cache Go modules and build
|
|
|
83
|
+ uses: actions/cache@v5
|
|
|
84
|
+ with:
|
|
|
85
|
+ path: |
|
|
|
86
|
+ ~/go/pkg/mod
|
|
|
87
|
+ ~/.cache/go-build
|
|
|
88
|
+ key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
|
|
|
89
|
+ restore-keys: |
|
|
|
90
|
+ ${{ runner.os }}-go-
|
|
|
91
|
+
|
|
72
|
92
|
- name: Run fuzzing
|
|
73
|
93
|
run: mise tasks run 'test:fuzz:*'
|
|
74
|
94
|
|
|
|
@@ -86,6 +106,16 @@ jobs:
|
|
86
|
106
|
- uses: jdx/mise-action@v3
|
|
87
|
107
|
name: Install mise
|
|
88
|
108
|
|
|
|
109
|
+ - name: Cache Go modules and build
|
|
|
110
|
+ uses: actions/cache@v5
|
|
|
111
|
+ with:
|
|
|
112
|
+ path: |
|
|
|
113
|
+ ~/go/pkg/mod
|
|
|
114
|
+ ~/.cache/go-build
|
|
|
115
|
+ key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
|
|
|
116
|
+ restore-keys: |
|
|
|
117
|
+ ${{ runner.os }}-go-
|
|
|
118
|
+
|
|
89
|
119
|
- name: Run linter
|
|
90
|
120
|
run: mise tasks run lint
|
|
91
|
121
|
|
|
|
@@ -123,14 +153,6 @@ jobs:
|
|
123
|
153
|
- name: Setup BuildX
|
|
124
|
154
|
uses: docker/setup-buildx-action@v3
|
|
125
|
155
|
|
|
126
|
|
- - name: Setup cache
|
|
127
|
|
- uses: actions/cache@v5
|
|
128
|
|
- with:
|
|
129
|
|
- path: /tmp/buildx-cache
|
|
130
|
|
- key: ${{ runner.os }}-buildx-${{ github.sha }}
|
|
131
|
|
- restore-keys: |
|
|
132
|
|
- ${{ runner.os }}-buildx-
|
|
133
|
|
-
|
|
134
|
156
|
- name: Login to DockerHub
|
|
135
|
157
|
if: github.event_name != 'pull_request'
|
|
136
|
158
|
uses: docker/login-action@v3
|
|
|
@@ -147,7 +169,7 @@ jobs:
|
|
147
|
169
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
148
|
170
|
|
|
149
|
171
|
- name: Build and push
|
|
150
|
|
- uses: docker/build-push-action@v2
|
|
|
172
|
+ uses: docker/build-push-action@v6
|
|
151
|
173
|
with:
|
|
152
|
174
|
pull: true
|
|
153
|
175
|
context: .
|
|
|
@@ -155,5 +177,5 @@ jobs:
|
|
155
|
177
|
push: ${{ github.event_name != 'pull_request' }}
|
|
156
|
178
|
tags: ${{ steps.meta.outputs.tags }}
|
|
157
|
179
|
labels: ${{ steps.meta.outputs.labels }}
|
|
158
|
|
- cache-from: type=local,src=/tmp/buildx-cache
|
|
159
|
|
- cache-to: type=local,dest=/tmp/buildx-cache
|
|
|
180
|
+ cache-from: type=gha
|
|
|
181
|
+ cache-to: type=gha,mode=max
|