Skip to content

Mixed inputs

Mixed inputs #16

Workflow file for this run

name: Mixed inputs
on:
push:
branches:
- "main"
workflow_dispatch:
inputs:
name:
type: choice
description: Who to greet
options:
- monalisa
- cschleiden
- hujjj
required: true
use-emoji:
type: boolean
description: Include 🎉🤣 emojis
message:
description: message
type: string
jobs:
greet:
runs-on: ubuntu-latest
if: ${{ !! github.event.inputs.message }}
steps:
- name: Send greeting
run: echo "${{ github.event.inputs.message }} ${{ fromJSON('["", "🥳"]')[github.event.inputs.use-emoji == 'true'] }} ${{ github.event.inputs.name }}"
no-greet:
runs-on: ubuntu-latest
if: ${{ ! github.event.inputs.message }}
steps:
- name: Send greeting
run: echo "Supplymessage ${{ fromJSON('["", "🥳"]')[github.event.inputs.use-emoji == 'true'] }} ${{ github.event.inputs.name }}"
exit:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.message }} = 'exit'
steps:
- name: Early exit
run: |
echo "Early exit github.run_id ${{ github.run_id }}"
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
env:
GH_TOKEN: ${{ github.token }}
release-front-end-assets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '18.x'
- run: npm ci
- run: npm test
- run: npm run lint