Skip to content

Commit d67e089

Browse files
authored
Update README.md
1 parent bbeaa03 commit d67e089

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
11
# GitHub Action Utils
22

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+
35
### Example:
46

57
```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")
913

10-
debug("Debug message")
14+
gha_utils.debug("Debug message")
1115

12-
warning(
16+
gha_utils.warning(
1317
"Warning message", title="Warning Title", file="example.py",
1418
col=1, end_column=2, line=5, end_line=6,
1519
)
16-
warning("Another warning message")
20+
gha_utils.warning("Another warning message")
1721

18-
error(
22+
gha_utils.error(
1923
"Error message", title="Error Title", file="example.py",
2024
col=1, end_column=2, line=1, end_line=2,
2125
)
22-
notice("Another notice message")
26+
gha_utils.notice("Another notice message")
2327

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")
2731
```
2832

2933
#### Colorful Grouped Build Log Output

0 commit comments

Comments
 (0)