-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.7 KB
/
dispatch-args.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
56
57
58
59
name: Workflow on demand (workflow_dispatch)
# Workflow on demand: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#providing-inputs
# How to run: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
on:
workflow_call:
inputs:
from_workflow_call:
description: 'To know the trigger was workflow_call'
required: false
default: true
type: boolean
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
text:
description: 'Input text'
required: false
default: bonjour
type: string
test_mode:
description: 'Test mode'
required: false
default: false
type: boolean
environment:
description: |
This is a really really really really really really really long description.
This is also using multiple lines with *markdown*.
This is also using multiple lines with *markdown*.
Otsukare sama desu.
type: environment
required: true
default: Staging
jobs:
log-the-inputs:
runs-on: ubuntu-latest
steps:
- name: Step on demand
env:
DISPATCH_LEVEL: ${{ inputs.logLevel }}
DISPATCH_TAGS: ${{ inputs.tags }}
DISPATCH_ENVIRONMENT: ${{ inputs.environment }}
run: |
echo "Text: ${{ inputs.text }}"
echo "Test mode: ${{ inputs.test_mode || 'false' }}"
echo "From workflow: ${{ inputs.from_workflow_call }}"
env