DevOps Classroom notes 23/Jul/2026

Github actions Inputs and types of inputs

Inputs will suppourt three different contexts

  1. workflow_dispatch : manual tigger /api trigger
  2. workflow_call (reuseful workflow)
  3. composite actions (reuseful actions)

Types of inputs:

  • string – input as simple text Ex: devlopment , org, …etc
  • number/integer – inputs integer or floot value Ex: 1, 1.0.0
  • choice – list of string need select option Ex:
    • dev
    • stage
    • int
    • prod
  • boolen: true/false or yes/no
  • Enviroment
name: manual jobs

on:
  workflow_dispatch:
    inputs:
      enviroment:
        description: demo
        required: true
        type: string
        default: "dev"

      allow-run:
        description: allow to run steps
        required: true
        type: boolean
        default: true

      data_env:
        description: allow to run steps
        required: true
        type: choice
        options:
          - dev
          - stg
          - prod
          - int
        default: dev 
      
      value:
        description: demo
        required: true
        type: number
        default: 1000
      



jobs:
  demo-inpts:
    runs-on: ubuntu-latest
    steps:
      - name: checkout repo branch
        uses: actions/checkout@v7

      - name: print values inputs
        run: |
          echo "env: ${{ github.event.inputs.enviroment }}"
      - name: allow-run true
        if: ${{ github.event.inputs.allow-run == true }}
        run:
          echo "Build started"

      - name: demp choice inputs
        run: |
          echo "my data env is ${{ github.event.inputs.data_env }}"
          echo "${{ github.event.inputs.value }}"

task:

  1. create new workflow add inputs
    1. env – choice inputs
    2. docker_image_name – string
    3. reponame – choice input
      1. normal repo
      2. snapshort
    4. image_version – number 120
    5. push true – blooen input

FROM ubuntu-latest

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%