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 @@ -180,6 +180,36 @@ jobs:
180
180
- name : print tag
181
181
run : echo "ok we're publishing!"
182
182
183
+ publish-to-dockerhub :
184
+ runs-on : ubuntu-latest
185
+ needs : [plan, should-publish]
186
+ steps :
187
+ - uses : actions/checkout@v4
188
+ with :
189
+ submodules : recursive
190
+ - name : Login to Docker Hub
191
+ uses : docker/login-action@v3
192
+ with :
193
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
194
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
195
+ - name : " Build and push docker image"
196
+ run : |
197
+ docker build . -t leptos/cargo-leptos:latest -t leptos/cargo-leptos:stable;
198
+ docker push leptos/cargo-leptos:latest;
199
+ docker push leptos/cargo-leptos:stable;
200
+
201
+ tag="";
202
+ for i in $(echo ${{ needs.plan.outputs.tag }} | tr '.' '\n')
203
+ do
204
+ if [[ $tag == "" ]]; then
205
+ tag="$i";
206
+ else
207
+ tag="$tag.$i";
208
+ fi
209
+ docker tag leptos/cargo-leptos:latest leptos/cargo-leptos:$tag;
210
+ docker push leptos/cargo-leptos:$tag;
211
+ done
212
+
183
213
# Create a Github Release with all the results once everything is done
184
214
publish-release :
185
215
needs : [plan, should-publish]
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