-
-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected input(s) 'commit' #64
Comments
Right, What is your use-case, maybe it is worth "documenting" it in the |
Ah, gotcha. Well for use case I'm using slash command dispatch to dispatch some jest tests. The comment is made on the PR (you would actually comment I would be happy to post a simple example YAML of my workflow if that helps illustrate my example more. |
Very interesting use-case, please add an example YAML file to see how this all wires together (especially the commit sha). |
File that runs the jest tests: name: Run jest tests
on:
repository_dispatch:
types: [e2e-command]
jobs:
test_local:
needs: build_local
runs-on: ubuntu-latest
steps:
# repository_dispatch doesn't have the correct $GITHUB_REF so we need to provide it
# first, get the name of the branch from the PR
- name: Github API Request
id: request
uses: octokit/request-action@v2.0.0
with:
route: ${{ github.event.client_payload.github.payload.issue.pull_request.url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# then, check it out
- uses: actions/checkout@v2
with:
ref: ${{ fromJson(steps.request.outputs.data).head.ref }}
- name: Set up Node.js v13
uses: actions/setup-node@v1
with:
node-version: '13.x'
- name: Node install dependencies
uses: bahmutov/npm-install@v1
- name: Run tests
run: |
npm run serve &
npm test ${{ github.event.client_payload.slash_command.args.unnamed.all }}
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v1.6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: test/results/*.xml
report_individual_runs: true
commit: ${{ fromJson(steps.request.outputs.data).head.sha }} Dispatch file: name: Slash Command Dispatch
on:
issue_comment:
types: [created]
jobs:
slashCommandDispatch:
runs-on: ubuntu-latest
steps:
- name: Slash Command Dispatch
uses: peter-evans/slash-command-dispatch@v2
with:
token: ${{ secrets.PAT }}
commands: |
e2e Then, in a PR, you can comment |
This is an excellent use case for the Please try the action from this branch:
Let me know if the warning goes away. |
@RyanSchw any chance to test the action from this branch? |
I lost access to the repo that was running that CICD pipeline. I think the warning went away when it ran, though. Sorry I can’t be more helpful. |
Thanks for insights, fix is merged! |
can I get reports in comment for a workflow_dispatch event? I've also mentioned the commit parameter as head SHA of PR? Should I mentioning it as head of workflow event? |
I'm running v1.6 and provided a git sha as shown in the README.
However, I get the following warning:
The text was updated successfully, but these errors were encountered: