Skip to content

07 - Using Expressions #5

07 - Using Expressions

07 - Using Expressions #5

Workflow file for this run

name: 07 - Using Expressions
on:
push:
workflow_dispatch:
inputs:
debug:
type: boolean
default: false
jobs:
echo:
runs-on: ubuntu-latest
steps:
- name: '[debug] Print start-up data'
if: ${{ inputs.debug }}
run: |
echo "Triggered by: ${{ github.event_name }}"
echo "Branch: ${{ github.ref }}"
echo "Commit SHA: ${{ github.sha }}"
echo "Runner OS: ${{ runner.os }}"
- name: '[debug] Print when triggered from main'
if: ${{ inputs.debug && github.ref == 'refs/heads/main' }}
run: echo "I was triggered from main"
- name: Greeting
run: echo "Hello, world"