Click Actions in the warehouse, if Actions have been added, the following interface will be displayed.
Click New workflow
to add.
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 Replyon:issues:types: [labeled]jobs:reply-helper:runs-on: ubuntu-lateststeps:- name: help wantedif: github.event.label.name == 'help wanted'uses: actions-cool/issues-helper@v2.0.0with: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 referencename
: The workflow nameon
: The action trigger conditionuses
: Use actions nameuses: actions-cool/issues-helper@v2.0.0
。Please refer to version selectionissues-hepler
parameteractions
: The name of the function used, required. Support multiple, separated by commas, such as create-comment,close-issue
means comment and close issuetoken
: A person who needs to have push permission tokenissue-number
: Incoming parameter, here means the number of the current issue. If you are confused about the writing, you can viewbody
: Incoming parameters, here means the content of the current commentWhen 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.