Skip to content

Commit

Permalink
Add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Evans committed Nov 24, 2019
1 parent 03a4ec0 commit c244258
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/create-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Create Comment
on:
push:
branches:
- master
jobs:
createComment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

# For debugging purposes. Remove this in production.
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"

- name: Create comment
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: 1
body: |
This is a multi-line test comment
- With GitHub **Markdown**
- Created by [create-or-update-comment][1]
[1]: https://github.com/peter-evans/create-or-update-comment
reaction-type: +1
31 changes: 31 additions & 0 deletions .github/workflows/update-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update Comment
on:
issue_comment:
types: [created]
jobs:
updateComment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

# For debugging purposes. Remove this in production.
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"

- name: Update comment
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ github.event.comment.id }}
body: |
**Edit:** Some additional info
reaction-type: eyes

- name: Add reaction
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ github.event.comment.id }}
reaction-type: heart

0 comments on commit c244258

Please sign in to comment.