Skip to content

Commit eda8360

Browse files
committed
Add Option to Run Workflow Commands using Python Subprocess Module
1 parent 61ee007 commit eda8360

2 files changed

Lines changed: 93 additions & 35 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pip install github-action-utils
2727

2828
This section documents all the functions provided by `github-action-utils`. The functions in the package should be used inside a workflow run.
2929

30-
### **`echo(message)`**
30+
### **`echo(message, use_subprocess=False)`**
3131

3232
Prints specified message to the action workflow console.
3333

@@ -42,7 +42,7 @@ Prints specified message to the action workflow console.
4242
# Hello World
4343
```
4444

45-
### **`debug(message)`**
45+
### **`debug(message, use_subprocess=False)`**
4646

4747
Prints colorful debug message to the action workflow console.
4848
GitHub Actions Docs: [debug](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-a-debug-message)
@@ -58,7 +58,7 @@ GitHub Actions Docs: [debug](https://docs.github.com/en/actions/using-workflows/
5858
# ::debug ::Hello World
5959
```
6060

61-
### **`notice(message, title=None, file=None, col=None, end_column=None, line=None, end_line=None)`**
61+
### **`notice(message, title=None, file=None, col=None, end_column=None, line=None, end_line=None, use_subprocess=False)`**
6262

6363
Prints colorful notice message to the action workflow console.
6464
GitHub Actions Docs: [notice](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-a-notice-message)
@@ -82,7 +82,7 @@ GitHub Actions Docs: [notice](https://docs.github.com/en/actions/using-workflows
8282
# ::notice title=test title,file=abc.py,col=1,endColumn=2,line=4,endLine=5::test message=
8383
```
8484

85-
### **`warning(message, title=None, file=None, col=None, end_column=None, line=None, end_line=None)`**
85+
### **`warning(message, title=None, file=None, col=None, end_column=None, line=None, end_line=None, use_subprocess=False)`**
8686

8787
Prints colorful warning message to the action workflow console.
8888
GitHub Actions Docs: [warning](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-a-warning-message)
@@ -106,7 +106,7 @@ GitHub Actions Docs: [warning](https://docs.github.com/en/actions/using-workflow
106106
# ::warning title=test title,file=abc.py,col=1,endColumn=2,line=4,endLine=5::test message
107107
```
108108

109-
### **`error(message, title=None, file=None, col=None, end_column=None, line=None, end_line=None)`**
109+
### **`error(message, title=None, file=None, col=None, end_column=None, line=None, end_line=None, use_subprocess=False)`**
110110

111111
Prints colorful error message to the action workflow console.
112112
GitHub Actions Docs: [error](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-a-error-message)
@@ -130,7 +130,7 @@ GitHub Actions Docs: [error](https://docs.github.com/en/actions/using-workflows/
130130
# ::error title=test title,file=abc.py,col=1,endColumn=2,line=4,endLine=5::test message
131131
```
132132

133-
### **`set_output(name, value)`**
133+
### **`set_output(name, value, use_subprocess=False)`**
134134

135135
Sets an action's output parameter for the running workflow.
136136
GitHub Actions Docs: [set_output](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter)
@@ -146,7 +146,7 @@ GitHub Actions Docs: [set_output](https://docs.github.com/en/actions/using-workf
146146
# ::set-output name=test_name::test_value
147147
```
148148

149-
### **`save_state(name, value)`**
149+
### **`save_state(name, value, use_subprocess=False)`**
150150

151151
Creates environment variable for sharing state with workflow's pre: or post: actions.
152152
GitHub Actions Docs: [save_state](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#sending-values-to-the-pre-and-post-actions)
@@ -192,7 +192,7 @@ Gets user input from running workflow.
192192
# my value
193193
```
194194

195-
### **`begin_stop_commands(token=None)` and `end_stop_commands(token)`**
195+
### **`begin_stop_commands(token=None, use_subprocess=False)` and `end_stop_commands(token, use_subprocess=False)`**
196196

197197
Stops processing any workflow commands. This special command allows you to log anything without accidentally running a workflow command.
198198
GitHub Actions Docs: [stop_commands](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#stopping-and-starting-workflow-commands)
@@ -224,7 +224,7 @@ GitHub Actions Docs: [stop_commands](https://docs.github.com/en/actions/using-wo
224224
# ::my_token::
225225
```
226226

227-
### **`start_group(title)` and `end_group()`**
227+
### **`start_group(title, use_subprocess=False)` and `end_group(use_subprocess=False)`**
228228

229229
Creates an expandable group in the workflow log.
230230
GitHub Actions Docs: [group](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines)
@@ -256,7 +256,7 @@ GitHub Actions Docs: [group](https://docs.github.com/en/actions/using-workflows/
256256
# ::endgroup::
257257
```
258258

259-
### **`add_mask(value)`**
259+
### **`add_mask(value, use_subprocess=False)`**
260260

261261
Masking a value prevents a string or variable from being printed in the workflow console.
262262
GitHub Actions Docs: [add_mask](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#masking-a-value-in-log)

0 commit comments

Comments
 (0)