Skip to content

Commit d5e4028

Browse files
authored
Merge pull request #5755 from unisonweb/arya/tmate-action
add a dedicated tmate workflow
2 parents d3f20d7 + 7b16644 commit d5e4028

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/tmate.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: build jit binary
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
runner:
7+
description: runner image
8+
type: choice
9+
options:
10+
- ubuntu-24.04
11+
- macos-13
12+
- macos-14
13+
- windows-2022
14+
- windows-2025
15+
custom_runner:
16+
description: a different runner image
17+
type: string
18+
19+
jobs:
20+
set-runner:
21+
runs-on: ubuntu-latest
22+
outputs:
23+
runner: ${{ steps.set_runner.outputs.runner }}
24+
steps:
25+
- id: set_runner
26+
run: |
27+
if [[ -n "${{ inputs.custom_runner }}" ]]; then
28+
echo "runner=${{ inputs.custom_runner }}" >> "$GITHUB_OUTPUT"
29+
elif [[ -n "${{ inputs.runner }}" ]]; then
30+
echo "runner=${{ inputs.runner }}" >> "$GITHUB_OUTPUT"
31+
else
32+
echo "Error: Neither `runner` nor `custom_runner` is defined." >&2
33+
exit 1
34+
fi
35+
36+
tmate:
37+
name: launch tmate
38+
needs: set-runner
39+
runs-on: ${{ needs.set-runner.outputs.runner }}
40+
steps:
41+
- name: setup tmate session
42+
uses: mxschmitt/action-tmate/detached@7b6a61a73bbb9793cb80ad69b8dd8ac19261834c # v3.22

0 commit comments

Comments
 (0)