File tree Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -249,11 +249,35 @@ jobs:
249
249
exit 1
250
250
fi
251
251
252
- - name : debug with tmate
252
+ - name : Start tmate in C:\msys64 upon failure
253
253
if : failure()
254
- uses : mxschmitt/action-tmate@v3
255
- with :
256
- limit-access-to-actor : true
254
+ shell : pwsh
255
+ run : |
256
+ C:\msys64\usr\bin\bash.exe -lc @"
257
+ set -x &&
258
+ # restrict SSH access to the \`"actor\`", i.e. the GitHub user who triggered this workflow
259
+ # this requires calling \`ssh -i <private-key> [...]\` later on
260
+ mkdir -p ~/.ssh &&
261
+ echo \`"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDSXs87cLXHuXPXjPTyb3HTDizuD07CytsUgjXazbkfzD7/EZF5g6cRWnc+gbqApQCzGSbLXxCd+AV/UxyS62v34kO/k5olz6DF6aMURbvFqrB9v0px86T0ScYjehUf5NYzGixIIghW3Pdxqi6s8BRuNuUjTGsNDzlMLA8N9pK1TOBZglsRlBUdtg7zeXBN/gkS7tf44eAw7gxMNfhrb1ackEveeu7PDUEvkoHSfMFITBgd8z4PonoxZjWrijoQXxXKuD1GtWrvfev1yc6hGnLlRK8HCnnq87eYUd5iUVO2yWNBhVkySJMp66UuHKne7uROXslIhUT98cgDU04T/ZpZ2qwQqpsl0ohDC8rqiLSeAFNZQZdjwVAXtH+FIQLT8fyHaU8HsHD4exMPUHSaKIRL0kBbPS8Wxj1qh/F3lNPPtIxEmlbpVN56xSUkFGqBJRET4FIH+UpDiQE7nsaD4rl3iys7Aj0B2gFMttOOvq8J/dFOMqX+NEyiMAHVsFT0SBnKZfk5J96kWOANbJa753QC/01G8wiMKTU6M87Ziv3mB/FqIu97+78TYhEzdAOr3V7NZp/ccx6LoD7zvcDkKCaWD9PxPX2hcv70fZ/WsZ6wrkVEmBHs3vJ7lM+caTR8ndjt9wC5ceRfI1s55wZ8AZ9PJ2PVxpm9ZYDsgsiQXIwAFQ==\`" >~/.ssh/authorized_keys &&
262
+
263
+ # install tmate
264
+ pacman -Sy --noconfirm tmate openssh &&
265
+
266
+ # Generate an SSH key (needed for tmate)
267
+ echo -e \`"y\\n\`" | ssh-keygen -q -t rsa -N \`"\`" -f ~/.ssh/id_rsa &&
268
+
269
+ # Start tmate session
270
+ export CHERE_INVOKING=1 &&
271
+ tmate -S /tmp/tmate.sock -a ~/.ssh/authorized_keys new-session -d &&
272
+ tmate -S /tmp/tmate.sock wait tmate-ready &&
273
+
274
+ # Print SSH invocation every 5 seconds, until tmate session has terminated
275
+ while test -e /tmp/tmate.sock
276
+ do
277
+ tmate -S /tmp/tmate.sock display -p \`"#{tmate_ssh}\`"
278
+ sleep 5
279
+ done
280
+ "@
257
281
258
282
- name : update check-run
259
283
if : env.CREATE_CHECK_RUN != 'false'
You can’t perform that action at this time.
0 commit comments