This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
55 lines (55 loc) · 1.83 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: trunk breakpoint
description: Set conditional breakpoints for your GitHub Actions. Securely pause/debug/resume your jobs
author: trunk.io
branding:
icon: terminal
color: gray-dark
inputs:
breakpoint-id: # id of breakpoint
description: Which breakpoint to trigger
required: true
run: # Command to run
description: Which command to run
required: true
trunk-token:
description: API key for trunk. Should be in your secrets
required: true
debug:
description: Add debug level logs
default: false
required: false
shell:
description: Which shell to run with
default: bash
required: false
org:
description: Which organization the breakpoint is associated with
required: false
trunk-path:
description:
Path to Trunk Launcher. If not provided, we'll look for it the repo root, `.trunk/bin` and
`tools/`. If it can't be found anywhere and is not provided explicitly, we'll download it on
demand.
required: false
working-directory:
description: Working directory of breakpoint
required: false
default: ./
runs:
using: composite
steps:
- name: Run command inside debugger
run: |
if [[ "${{inputs.org}}" != "" ]]; then
${GITHUB_ACTION_PATH}/trunk breakpoint --debug=${{ inputs.debug }} --org=${{ inputs.org }} --id="${{ inputs.breakpoint-id }}" -- "${{ inputs.run }}"
else
${GITHUB_ACTION_PATH}/trunk breakpoint --debug=${{ inputs.debug }} --id="${{ inputs.breakpoint-id }}" -- "${{ inputs.run }}"
fi
shell: ${{ inputs.shell }}
working-directory: ${{ inputs.working-directory }}
env:
TRUNK_GITHUB_CONTEXT: ${{ toJSON(github) }}
TRUNK_TOKEN: ${{ inputs.trunk-token }}
SHELL: ${{ inputs.shell }}
GH_TOKEN: ${{ github.token }}
TRUNK_LAUNCHER_QUIET: 1