request-action icon indicating copy to clipboard operation
request-action copied to clipboard

[DOCS]: Clarify how to set body inputs

Open miguel-vila opened this issue 4 months ago • 3 comments

Describe the need

I had to look into the code in order to do pass input to a workflow dispatch invocation. And I'm not sure if I did it the way that's intended. The inputs section in the readme wasn't clear enough to me. Could we clarify that?

This is the invocation I ended up with:

- uses: octokit/[email protected]
  if: contains(github.event.pull_request.labels.*.name, 'open-ar-pr')
  with:
    route: POST /repos/platform-common/api-registry/actions/workflows/bump-arlib-version.yml/dispatches
    mediaType: application/vnd.github.v3+json
    ref: main
  env:
    GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
    INPUT_INPUTS: |
      {
        "pr-number": "${{ github.event.pull_request.number }}",
        "version": "${{ steps.get-version.outputs.version }}"
      }

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

miguel-vila avatar Feb 09 '24 19:02 miguel-vila