Skip to content

File input UI

File input UI #317

Workflow file for this run

name: Slash Command Dispatch
on:
issue_comment:
types: [created]
jobs:
slash-command-dispatch:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
id: get-pr
with:
script: |
const request = {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
}
core.info(`Getting PR #${request.pull_number} from ${request.owner}/${request.repo}`)
try {
const result = await github.pulls.get(request)
return result.data
} catch (err) {
core.setFailed(`Request failed with error ${err}`)
}
- name: Slash Command Dispatch
uses: peter-evans/slash-command-dispatch@v2
with:
token: ${{ secrets.BOT_TOKEN }}
reaction-token: ${{ secrets.BOT_TOKEN }}
permission: write
dispatch-type: workflow
event-type-suffix: ""
commands: |
deploy
static-args: |
comment-id=${{ github.event.comment.id }}
event-number=${{ github.event.issue.number }}
ref=${{ fromJSON(steps.get-pr.outputs.result).head.ref }}
- name: Edit comment with error message
if: steps.scd.outputs.error-message
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.comment.id }}
body: |
> ${{ steps.scd.outputs.error-message }}