Merge pull request #4 from mangelarilla/master

Update to support new workflow syntax
This commit is contained in:
Aaron Klaassen 2019-10-01 16:25:07 -05:00 committed by GitHub
commit 18e8a714e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 11 deletions

View file

@ -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!"
```

15
action.yml Normal file
View file

@ -0,0 +1,15 @@
name: Comment on PR
author: Aaron Klaassen <aaron@unsplash.com>
description: Leaves a comment on an open PR matching a push event.
branding:
icon: 'message-square'
color: 'blue'
inputs:
msg:
description: Comment's message
required: true
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.msg }}