+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ pip install github-action-utils

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

### **`echo(message)`**
**Note:** You can run the commands using python's `subprocess` module by using `use_subprocess` function parameter or `COMMANDS_USE_SUBPROCESS` environment variable.

### **`echo(message, use_subprocess=False)`**

Prints specified message to the action workflow console.

Expand All @@ -42,7 +44,7 @@ Prints specified message to the action workflow console.
# Hello World
```

### **`debug(message)`**
### **`debug(message, use_subprocess=False)`**

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

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

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

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

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

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

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

### **`set_output(name, value)`**
### **`set_output(name, value, use_subprocess=False)`**

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

### **`save_state(name, value)`**
### **`save_state(name, value, use_subprocess=False)`**

Creates environment variable for sharing state with workflow's pre: or post: actions.
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)
Expand Down Expand Up @@ -192,7 +194,7 @@ Gets user input from running workflow.
# my value
```

### **`begin_stop_commands(token=None)` and `end_stop_commands(token)`**
### **`begin_stop_commands(token=None, use_subprocess=False)` and `end_stop_commands(token, use_subprocess=False)`**

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

### **`start_group(title)` and `end_group()`**
### **`start_group(title, use_subprocess=False)` and `end_group(use_subprocess=False)`**

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

### **`add_mask(value)`**
### **`add_mask(value, use_subprocess=False)`**

Masking a value prevents a string or variable from being printed in the workflow console.
GitHub Actions Docs: [add_mask](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#masking-a-value-in-log)
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载