Skip to content
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

feat(inputs): parse valid yaml #14

Closed
wants to merge 1 commit into from
Closed

feat(inputs): parse valid yaml #14

wants to merge 1 commit into from

Conversation

hitmands
Copy link

@hitmands hitmands commented Mar 7, 2021

Manually constructing a valid json string is sometimes challenging and error prone,
especially if its size is quite consistent.

Being able to pass a valid YAML syntax would help:

- name: Invoke workflow in another repo with inputs
  uses: benc-uk/workflow-dispatch@v1
  with:
    workflow: Some Workflow
    repo: benc-uk/example
    token: ${{ secrets.PERSONAL_TOKEN }}
    inputs: |
      message: "Hello World"
      list:
        - "Yeah, this should work too"
      map:
        field: "Yeah, POJOs are supported too"

It maps to:

{
  message: 'Hello World',
  list: [ 'Yeah, this should work too' ],
  map: { field: 'Yeah, POJOs are supported too' }
}

@deepankarm
Copy link

This is really nice! When can this be merged?

@hitmands
Copy link
Author

😆 Closing this one 😆

@hitmands hitmands closed this Apr 15, 2022
@hitmands hitmands deleted the hitmands/allow-yaml-inputs branch April 15, 2022 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants