Skip to content

Instantly share code, notes, and snippets.

@gaborvecsei
Created March 13, 2020 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaborvecsei/c57a7fe8e16cdc645d01d96366d743dc to your computer and use it in GitHub Desktop.
Save gaborvecsei/c57a7fe8e16cdc645d01d96366d743dc to your computer and use it in GitHub Desktop.
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 }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment