Skip to content

Basic Workflow

Basic Workflow #1

# Name display of workflow
name: Basic Workflow
# When the action will run, workflow_dispatch gives a manual button to trigger it. For the button to show you have to have a version of this workflow file on default branch
on:
workflow_dispatch:
# Inputs the workflow accepts
inputs:
name:
# Friendly description to be shown in the UI instead of 'name'
description: "Person to greet"
# Default value
default: "World"
# Input has to be provided for the workflow to run
required: true
# Input type
type: string
city:
description: "Favourite city"
required: true
default: "Leeds"
type: choice
options:
- New York
- Tokyo
- Leeds
fav-colour-blue:
description: "Is your favourite colour blue"
required: true
type: boolean
# Workflows made up of one or more jobs.
jobs:
# This workflow has one job called greet
greet:
# Displays name for job
name: "Greetings, Program!"
# Type of runner the job will run on
runs-on:
- ubuntu-latest
# Steps represent a sequence of tasks that will be executed in job
steps:
# Runs commands using the runners shell and gets context from the github object
- name: Send greeting
run: |
echo "Hello ${{ github.event.inputs.name }}"
echo "Your favourite city is ${{ github.event.inputs.city }}"
echo "Is your favourite colour blue: ${{ github.event.inputs.name }}"