-
Notifications
You must be signed in to change notification settings - Fork 3
28 lines (27 loc) · 1.21 KB
/
main.yaml
File metadata and controls
28 lines (27 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Demo
on: [issue_comment]
jobs:
my_first_job:
runs-on: ubuntu-latest
name: Just a simple demo job
steps:
- name: Checkout
uses: actions/checkout@master
- name: See full payload (for debugging)
env:
PAYLOAD: ${{ toJSON(github.event) }}
run: echo "FULL PAYLOAD:\n${PAYLOAD}\n"
- name: Run the container and make a prediction
if: startsWith(github.event.comment.body, '/predict')
uses: ./
id: make_prediction
with:
issue_comment_body: ${{ github.event.comment.body }}
issue_number: ${{ github.event.issue.number }}
issue_user: ${{ github.event.comment.user.login }}
- name: Print the output from the container(for debugging)
run: echo "The reply message is ${{steps.make_prediction.outputs.issue_comment_reply}}"
- name: Send reply to issue for user
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash issue_comment.sh "${{steps.make_prediction.outputs.issue_comment_reply}}" "${{ github.event.issue.number }}"