Quick start

1. New Action

Click Actions in the warehouse, if Actions have been added, the following interface will be displayed.

Click New workflow to add.

You can click set up a workflow yourself to add a custom action, or you can apply a new action based on a template. Templates.

2. Edit Action

Actions storage address is fixed, unified as /.github/workflows/xx.yml.

Let's take the example of the home page and explain it in detail. The corresponding scenario is: when an issue adds the help wanted tag, the system will automatically comment.

name: Issue Reply
on:
issues:
types: [labeled]
jobs:
reply-helper:
runs-on: ubuntu-latest
steps:
- name: help wanted
if: github.event.label.name == 'help wanted'
uses: actions-cool/issues-helper@v2.0.0
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome PR。
你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈,欢迎PR。
  • YML syntax reference
  • name: The workflow name
    • Actions workflow name, can be customized according to actual situation
  • on: The action trigger condition
  • uses: Use actions name
    • uses: actions-cool/issues-helper@v2.0.0。Please refer to version selection
  • issues-hepler parameter
    • actions: The name of the function used, required. Support multiple, separated by commas, such as create-comment,close-issue means comment and close issue
    • token: A person who needs to have push permission token
    • issue-number: Incoming parameter, here means the number of the current issue. If you are confused about the writing, you can view
    • body: Incoming parameters, here means the content of the current comment

3. Enable Action

When you finish writing and submit to the master branch, you can automatically enable the workflow, and the trigger conditions follow the definition of on.

😏 I believe that you have a general understanding of how to use, do you want to try it quickly?

Please check the functions you need in Basic and Advanced for flexible reference.