mirror of
https://github.com/unsplash/comment-on-pr.git
synced 2024-09-20 07:36:02 +08:00
update readme for new workflow syntax
This commit is contained in:
parent
e760aabf79
commit
466532e69e
26
README.md
26
README.md
|
@ -5,19 +5,23 @@ A GitHub action to comment on the relevant open PR when a commit is pushed.
|
|||
## Usage
|
||||
|
||||
- Requires the `GITHUB_TOKEN` secret.
|
||||
- Requires the comment's message in the `args`.
|
||||
- Requires the comment's message in the `msg` parameter.
|
||||
|
||||
|
||||
### Sample workflow
|
||||
|
||||
```
|
||||
workflow "comment-on-pr example" {
|
||||
on = "push"
|
||||
resolves = ["unsplash/comment-on-pr@master"]
|
||||
}
|
||||
|
||||
action "unsplash/comment-on-pr@master" {
|
||||
uses = "unsplash/comment-on-pr@master"
|
||||
args = ["Check out this message!"]
|
||||
secrets = ["GITHUB_TOKEN"]
|
||||
}
|
||||
name: comment-on-pr example
|
||||
on: pull_request
|
||||
jobs:
|
||||
example:
|
||||
name: sample comment
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: comment PR
|
||||
uses: unsplash/comment-on-pr@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
msg: "Check out this message!"
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue