defenseunicorns / maru-runner

The Unicorn Task Runner
Apache License 2.0
8 stars 0 forks source link

Call tasks within other tasks with dynamic variables #16

Open AustinAbro321 opened 4 months ago

AustinAbro321 commented 4 months ago

Is your feature request related to a problem? Please describe

I am building out a task that calls other tasks with an input. The input is dynamic, generated from a for loop, and I want to call the child task with it. I can do this with uds run but this is not ideal in a few ways.

  - name: build-pkg
    description: Run unit tests for one package
    actions:
      - cmd: cd "${PKG}" &&  go build -o ../build/${PKG} .

  - name: build-all
    description: Run unit tests in all packages
    actions:
      - task: set-modules-variable
      - cmd: |
          for dir in ${MODULES}; do
            uds run build-pkg --set PKG=$dir
          done

Describe the solution you'd like

^ This is just one idea and might not work, but I think it would be nice to have a solution that can accomplish something similar