-
Notifications
You must be signed in to change notification settings - Fork 8
/
action.yml
53 lines (53 loc) · 1.56 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
name: 'Workflow Dispatcher'
description: 'Trigger a GitHub Action Workflow in a separate repo, show the link and wait for it to finish.'
author: 'Aditya Kar'
branding:
icon: 'fast-forward'
color: 'blue'
inputs:
owner:
description: 'Owner of the GitHub repo'
required: true
repo:
description: 'Name of the GitHub repo'
required: true
token:
description: 'Access token (PAT) for the repo'
required: true
event_type:
description: 'The event type of the repository dispatch'
required: true
client_payload:
description: 'Payload for the repository dispatch event'
default: "{}"
required: false
wait_time:
description: 'How long to wait between polls (seconds)'
default: "10"
required: false
max_time:
description: 'Maximum amount of time to wait for workflow (seconds)'
default: "600"
required: false
outputs:
workflow-id:
description: "ID of the triggered workflow"
value: ${{ steps.dispatch.outputs.workflow-id }}
conclusion:
description: "Result of the triggered workflow"
value: ${{ steps.dispatch.outputs.conclusion }}
runs:
using: "composite"
steps:
- id: dispatch
run: |
${{ github.action_path }}/dispatcher.sh
shell: bash
env:
INPUT_EVENT_TYPE: ${{ inputs.event_type }}
INPUT_OWNER: ${{ inputs.owner }}
INPUT_REPO: ${{ inputs.repo }}
INPUT_TOKEN: ${{ inputs.token }}
INPUT_CLIENT_PAYLOAD: ${{ inputs.client_payload }}
INPUT_WAIT_TIME: ${{ inputs.wait_time }}
INPUT_MAX_TIME: ${{ inputs.max_time }}