|
1 | 1 | # GitHub Action Utils |
2 | 2 |
|
| 3 | +A collection of python functions that can be used to run [GitHub Action Workflow Commands](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions) from a python script. |
| 4 | + |
3 | 5 | ### Example: |
4 | 6 |
|
5 | 7 | ```python |
6 | | -with group("My Group"): |
7 | | - set_output("test_var", "test_value") |
8 | | - save_state("state", "val") |
| 8 | +import github_action_utils as gha_utils |
| 9 | + |
| 10 | +with gha_utils.group("My Group"): |
| 11 | + gha_utils.set_output("test_var", "test_value") |
| 12 | + gha_utils.save_state("state", "val") |
9 | 13 |
|
10 | | - debug("Debug message") |
| 14 | + gha_utils.debug("Debug message") |
11 | 15 |
|
12 | | - warning( |
| 16 | + gha_utils.warning( |
13 | 17 | "Warning message", title="Warning Title", file="example.py", |
14 | 18 | col=1, end_column=2, line=5, end_line=6, |
15 | 19 | ) |
16 | | - warning("Another warning message") |
| 20 | + gha_utils.warning("Another warning message") |
17 | 21 |
|
18 | | - error( |
| 22 | + gha_utils.error( |
19 | 23 | "Error message", title="Error Title", file="example.py", |
20 | 24 | col=1, end_column=2, line=1, end_line=2, |
21 | 25 | ) |
22 | | - notice("Another notice message") |
| 26 | + gha_utils.notice("Another notice message") |
23 | 27 |
|
24 | | - append_job_summary("# Hello World") |
25 | | - append_job_summary("- Point 1") |
26 | | - append_job_summary("- Point 2") |
| 28 | + gha_utils.append_job_summary("# Hello World") |
| 29 | + gha_utils.append_job_summary("- Point 1") |
| 30 | + gha_utils.append_job_summary("- Point 2") |
27 | 31 | ``` |
28 | 32 |
|
29 | 33 | #### Colorful Grouped Build Log Output |
|
0 commit comments