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

feature request: foreach #550

Open
yohamta opened this issue Apr 8, 2024 · 0 comments
Open

feature request: foreach #550

yohamta opened this issue Apr 8, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@yohamta
Copy link
Collaborator

yohamta commented Apr 8, 2024

I'd like to add a feature that splits workflow execution into file-level units. By specifying a path in the foreach field of a step, subworkflow will be generated for each file matching that path. This will enable re-execution at the file level and simplify workflow management.

Example:

steps:
  - name: clean
    command: rm ./intermediate/*
  - name: create files
    command: create.py -o ./intermediate
    depends:
      - clean
  - name: process file
    foreach:
      files: ./intermediate/*
    command: process.py $FILE
    depends:
      - create files

call subworkflow:

steps:
  - name: clean
    command: rm ./intermediate/*
  - name: create files
    command: create.py -o ./intermediate
    depends:
      - clean
  - name: process file
    foreach:
      files: ./intermediate/*
    command: run foo-workflow --params="$FILE"
    depends:
      - create files
@yohamta yohamta changed the title feature request: input field feature request: foreach Apr 14, 2024
@yohamta yohamta added the feature request New feature or request label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant