You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+13-11
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
# Print Workflow Dispatch Inputs and Env Vars
2
2
3
-
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.
3
+
This GitHub Action prints all input values from a `workflow_dispatch` event to the log. Optionally, it can also print environment variablesand add inputs to the GitHub Summary in a collapsible format.
4
4
5
5
## Features
6
6
7
7
- Prints all `workflow_dispatch` inputs to the log
8
8
- Optionally prints all environment variables
9
+
- Optionally adds inputs to GitHub Summary in a collapsible format
9
10
- Minimal configuration required
10
-
- Doesn't require a GitHub token
11
11
- Lightweight and fast
12
12
13
13
## Usage
@@ -34,34 +34,36 @@ jobs:
34
34
runs-on: ubuntu-latest
35
35
steps:
36
36
- name: Print Workflow Dispatch Inputs and Env Vars
print_env_vars: 'true'# Set 'true' to print environment variables as well (default: false)
39
+
print_env_vars: 'true'# Set to 'true' to print environment variables
40
+
add_to_summary: 'true'# Set to 'true' to add inputs to GitHub Summary
40
41
```
41
42
42
-
When you manually trigger this workflow and provide values for the inputs, the action will print these input values to the log. If `print_env_vars` is set to 'true', it will also print all environment variables.
43
-
44
43
## Inputs
45
44
46
45
| Input | Description | Required | Default |
47
46
|-------|-------------|----------|---------|
48
47
| `print_env_vars` | Whether to print environment variables | No | 'false' |
48
+
| `add_to_summary` | Whether to add inputs to GitHub Summary | No | 'false' |
49
49
50
-
## How it Works
50
+
## Outputs
51
51
52
-
This action reads the event payload from the `GITHUB_EVENT_PATH` environment variable, which is automatically set by GitHub Actions. It then uses `jq` to extract and print the input values. If `print_env_vars` is set to 'true', it also prints all environment variables using the `env` command.
52
+
| Output | Description |
53
+
|--------|-------------|
54
+
| `output` | The full output of the action |
53
55
54
-
## Requirements
56
+
## GitHub Summary
55
57
56
-
This action is designed to work with `workflow_dispatch` events. It will not print inputs for other event types, but can still print environment variables if enabled.
58
+
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.
57
59
58
60
## License
59
61
60
62
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
61
63
62
64
## Contributing
63
65
64
-
Contributions, issues, and feature requests are welcome! Feel free to check [issues page](https://github.com/shayki5/print-workflow-dispatch-inputs/issues).
66
+
Contributions, issues, and feature requests are welcome! Feel free to check [issues page](https://github.com/your-username/print-workflow-dispatch-inputs/issues).
0 commit comments