rworkflows icon indicating copy to clipboard operation
rworkflows copied to clipboard

Explore nested GHA inputs

Open bschilder opened this issue 2 years ago • 0 comments

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:

  1. Create separate subactions that users can supply inputs to at each step. #4
  2. 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

bschilder avatar Sep 19 '23 08:09 bschilder