Skip to content

ci(github): use unary plus operator in mixed-inputs.yml #4

ci(github): use unary plus operator in mixed-inputs.yml

ci(github): use unary plus operator in mixed-inputs.yml #4

Workflow file for this run

# https://github.blog/changelog/2021-11-10-github-actions-input-types-for-manual-workflows/

Check failure on line 1 in .github/workflows/mixed-inputs.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/mixed-inputs.yml

Invalid workflow file

(Line: 23, Col: 12): Unexpected symbol: '+inputs.use-emoji'. Located at position 23 within expression: fromJSON('["", "🥳"]')[+inputs.use-emoji]
name: Mixed inputs
on:
workflow_dispatch:
inputs:
message:
required: true
name:
type: choice
description: Who to greet
options:
- monalisa
- cschleiden
use-emoji:
type: boolean
description: Include 🎉🤣 emojis
jobs:
greet:
runs-on: ubuntu-latest
steps:
- name: Send greeting
run: echo $MESSAGE ${{ toJSON(inputs.name) }} ${{ fromJSON('["", "🥳"]')[+inputs.use-emoji] }}
env:
MESSAGE: ${{ inputs.message }}