-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
40 lines (39 loc) · 1.44 KB
/
action.yml
File metadata and controls
40 lines (39 loc) · 1.44 KB
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
apiVersion: automation.cloudbees.io/v1alpha1
kind: action
name: Dispatch Workflows
inputs:
workflows-dispatch-file:
description: "Path to the file containing workflow dispatch requests"
required: true
token:
description: "Authorization token to authenticate workflow dispatch requests. It is recommended to pass the token as a secret reference to ensure security."
required: true
wait-for-completion:
description: "Flag to wait for the dispatched workflows to complete"
required: false
execution-mode:
description: "Execution mode for the workflow dispatch request"
required: false
default: "parallel"
runs:
using: "composite"
steps:
- id: run-workflow-dispatch-action
name: "Dispatch Workflows"
uses: docker://public.ecr.aws/l7o7z1g8/actions/workflow-dispatch-actions:main-2f55f8785ae75ce727b0d57725dd741e6ba06b4e
shell: sh
env:
RUN_ID: ${{ cloudbees.run_id }}
STEP_ID: ${{ step.internal.id }}
JOB_ID: ${{ job.id }}
DNS_URL: ${{ cloudbees.api.url }}
JWT_TOKEN: ${{ cloudbees.api.token }}
run: |
echo "RUN_ID: $RUN_ID"
cd /app
./workflow-dispatcher dispatch -i '{
"workflow_dispatch_requests_file":"${{ inputs.workflows-dispatch-file }}",
"token":"${{ inputs.token }}",
"wait_for_completion":"${{ inputs.wait-for-completion }}",
"execution_mode":"${{ inputs.execution-mode }}"
}'