rworkflows
rworkflows copied to clipboard
Explore nested GHA inputs
As the rworkflows actions gets more comprehensive, the parameter list continue to grow. It might be better to nest these arguments in some way.
Ways to do this:
- Create separate subactions that users can supply inputs to at each step. #4
- Nest inputs within the main rworkflow action: e.g.
in the workflow
steps:
- uses: neurogenomics/rworkflows@master
with:
run_bioccheck: ${{ false }}
opt_1: ${{ false }}
opt_2: 'myoption'
or maybe:
steps:
- uses: neurogenomics/rworkflows@master
with:
run_bioccheck.run: ${{ false }}
run_bioccheck.opt_1: ${{ false }}
run_bioccheck.opt_2: 'myoption'
in the action:
inputs.run_bioccheck.opt_2
Not sure if this syntax is supported by GHA though.
Documentation
- https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
- https://stackoverflow.com/questions/69450836/nesting-variable-reference-in-github-action-workflows
- https://github.com/common-workflow-language/common-workflow-language/issues/390#issuecomment-283754530