Skip to content

This GitHub Action prints all input values from a `workflow_dispatch` event to the log. Optionally, it can also print all environment variables. It's a simple and effective tool for debugging or verifying input values and environment settings in your manually triggered workflows.

License

Notifications You must be signed in to change notification settings

shayki5/print-workflow-dispatch-inputs

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Print Workflow Dispatch Inputs

This GitHub Action prints all input values from a workflow_dispatch event to the log. Optionally, it can also print environment variables and add inputs to the GitHub Summary in a collapsible format.

Features

  • Prints all workflow_dispatch inputs to the log
  • Optionally prints all environment variables
  • Optionally adds inputs to GitHub Summary in a collapsible format
  • Minimal configuration required
  • Lightweight and fast

Usage

To use this action in your workflow, add it as a step in your workflow_dispatch triggered workflow:

name: Print Inputs and Env Vars Example

on:
  workflow_dispatch:
    inputs:
      name:
        description: 'Your name'
        required: true
        type: string
      age:
        description: 'Your age'
        required: false
        type: number

jobs:
  print-inputs-and-env:
    runs-on: ubuntu-latest
    steps:
      - name: Print Workflow Dispatch Inputs and Env Vars
        uses: shayki5/print-workflow-dispatch-inputs@v1
        with:
          print_env_vars: 'true'  # Set to 'true' to print environment variables
          add_to_summary: 'true'  # Set to 'true' to add inputs to GitHub Summary

Inputs

Input Description Required Default
print_env_vars Whether to print environment variables No 'false'
add_to_summary Whether to add inputs to GitHub Summary No 'false'

GitHub Summary

When add_to_summary is set to 'true', the action will add the workflow dispatch inputs to the GitHub Summary in a collapsible format. This allows you to easily view the inputs without cluttering the summary.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check issues page.

Support

If you encounter any problems or have any questions, please open an issue in this repository.

About

This GitHub Action prints all input values from a `workflow_dispatch` event to the log. Optionally, it can also print all environment variables. It's a simple and effective tool for debugging or verifying input values and environment settings in your manually triggered workflows.

Resources

License

Stars

Watchers

Forks

Packages

No packages published