File tree 2 files changed +39
-0
lines changed
2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,36 @@ jobs:
233
233
name : artifacts
234
234
path : dist-manifest.json
235
235
236
+ publish-to-dockerhub :
237
+ runs-on : ubuntu-latest
238
+ needs : [plan, should-publish]
239
+ steps :
240
+ - uses : actions/checkout@v4
241
+ with :
242
+ submodules : recursive
243
+ - name : Login to Docker Hub
244
+ uses : docker/login-action@v3
245
+ with :
246
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
247
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
248
+ - name : " Build and push docker image"
249
+ run : |
250
+ docker build . -t leptos/cargo-leptos:latest -t leptos/cargo-leptos:stable;
251
+ docker push leptos/cargo-leptos:latest;
252
+ docker push leptos/cargo-leptos:stable;
253
+
254
+ tag="";
255
+ for i in $(echo ${{ needs.plan.outputs.tag }} | tr '.' '\n')
256
+ do
257
+ if [[ $tag == "" ]]; then
258
+ tag="$i";
259
+ else
260
+ tag="$tag.$i";
261
+ fi
262
+ docker tag leptos/cargo-leptos:latest leptos/cargo-leptos:$tag;
263
+ docker push leptos/cargo-leptos:$tag;
264
+ done
265
+
236
266
# Create a Github Release while uploading all files to it
237
267
announce :
238
268
needs :
Original file line number Diff line number Diff line change
1
+ FROM --platform=amd64 rust:1.71 as build
2
+
3
+ RUN cargo install cargo-leptos
4
+
5
+ FROM --platform=amd64 rust:1.71
6
+
7
+ COPY --from=build /usr/local/cargo/bin/cargo-leptos /usr/local/cargo/bin/cargo-leptos
8
+
9
+ ENTRYPOINT ["cargo-leptos" ]
You can’t perform that action at this time.
0 commit comments