skip to Main Content

I have created below workflow expecting github to ask the manual input and then run the rest of steps. However I don’t see any button run workflow such-as-this. The workflow shows "null" value in the "print steps" of my workflow.(see attached the screenprint)

Does anyone knows what is wrong and why it’s not prompting me any inputs?

name: Input Workflow

on:
  workflow_dispatch:
    inputs:
      myInput:
        description: 'User Input:'
        required: true
        default: "Hello World"
  push:
    branches:
      - feature/*



jobs:
  run-python-test:
    runs-on:  ubuntu-latest
    steps:

      - name: Execute Test Script
        run: |
          echo "Store: ${{ github.event.inputs.myInput }}"
          # INPUT_STORE=${{ github.event.inputs.myInput }} python3 input.py

outcome-workflow

2

Answers


  1. Chosen as BEST ANSWER

    The issue of not showing up any input parameters in GitHub action is due to fact that the workflow_dispatch is not present in default branch. definition


  2. inputs is a property of workflow_dispatch event but not push event:

    name: Input Workflow
    
    on:
      workflow_dispatch:
        inputs:
          myInput:
            description: 'User Input:'
            required: true
            default: "Hello World"
      push:
        branches:
          - feature/*
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search