Define multiple workflows in one yaml file

I tried to define multiple workflows on one yaml file using yaml document separator --- and it did not work. Is this by intention or did I miss something?

Example:

name: First Workflow
on: push
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: test
      run: echo "Hello, world."
---
name: Second Workflow
on: push
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: test
      run: echo "Hello, again."

Expected: two workflows are defined (called “First Workflow” and “Second Workflow”)

Actually: Only first workflow is defined (called “First Workflow”), second workflow is ignored

3 Likes

At the moment, that’s not supported.  You’ll need a single workflow per yaml file.

1 Like

Okay. Too bad, but thank you for your quick answer :slight_smile:

Hi, are there any plans to support this feature in the future ?

1 Like