Github Action for splitting pull request comment body arguments into JSON key-values. You can add any arguments and it will change the output into JSON key-values. For example, --<key>=<value>
will be converted to:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Split comment to args
uses: qassandrach/split-comment-to-args
id: split
with:
comment: ${{ github.event.comment.body }}
- name: Some other action
run: |
echo ${{ fromJSON(steps.split.outputs.result.<key>) }}
property |
isRequired |
default |
comment |
example |
comment |
✓ |
'' |
PR comment body as arguments into JSON key-values |
github.event.comment.body |
property |
type |
result |
JSON |
build --name=website --limit=10.0.0.0,11.0.0.0
{
name: 'website',
limit: ['10.0.0.0','11.0.0.0']
}