Skip to content

Commit b8081e0

Browse files
ci(github): refactor mixed-inputs.yml
1 parent 6bfeb00 commit b8081e0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/mixed-inputs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
# https://github.blog/changelog/2021-11-10-github-actions-input-types-for-manual-workflows/
22
name: Mixed inputs
3-
43
on:
54
workflow_dispatch:
65
inputs:
6+
message:
7+
required: true
78
name:
89
type: choice
910
description: Who to greet
1011
options:
1112
- monalisa
1213
- cschleiden
13-
message:
14-
required: true
1514
use-emoji:
1615
type: boolean
1716
description: Include 🎉🤣 emojis
1817

1918
jobs:
2019
greet:
2120
runs-on: ubuntu-latest
22-
2321
steps:
2422
- name: Send greeting
25-
run: echo "${{ github.event.inputs.message }} ${{ fromJSON('["", "🥳"]')[github.event.inputs.use-emoji == 'true'] }} ${{ github.event.inputs.name }}"
23+
run: echo "${{ toJSON(inputs.message) }} $NAME ${{ fromJSON('["", "🥳"]')[inputs.use-emoji == 'true'] }}"
24+
env:
25+
NAME: ${{ inputs.name }}

0 commit comments

Comments
 (0)