[GH-ISSUE #390] dependent workflows with workflow_run not triggering #276

Closed
opened 2026-03-01 21:41:58 +03:00 by kerem · 1 comment
Owner

Originally created by @aldegoeij on GitHub (Oct 14, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/390

Hi!

I have two workflow files:

one.yml:

name: One

on:
  push:

jobs:
  ...ABC

two.yml:

name: Two

on:
  workflow_run:
    workflows: ["One"]
    branches: [main]
    types:
      - completed

jobs:
  ...XYZ

And an event payload event.json:

{
  "action": "completed"
}

However, when I try to run the command:

act workflow_run --workflows ./.github/workflows/two.yml --eventpath ./event.json --verbose

I get error:

DEBU[0000] Loading environment from /xxxx/.env 
DEBU[0000] Loading secrets from                         
DEBU[0000] Loading workflow '/xxxx/.github/workflows/two.yml' 
DEBU[0000] Reading workflow '/xxxx/.github/workflows/two.yml' 
DEBU[0000] Planning event: workflow_run                 
FATA[0000] Unable to build dependency graph!

Could anyone give me a hand with triggering 'secondary' workflow files?

For workflow_run see: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_run

Originally created by @aldegoeij on GitHub (Oct 14, 2020). Original GitHub issue: https://github.com/nektos/act/issues/390 Hi! I have two workflow files: `one.yml`: ```yml name: One on: push: jobs: ...ABC ``` `two.yml`: ```yml name: Two on: workflow_run: workflows: ["One"] branches: [main] types: - completed jobs: ...XYZ ``` And an event payload `event.json`: ```json { "action": "completed" } ``` However, when I try to run the command: `act workflow_run --workflows ./.github/workflows/two.yml --eventpath ./event.json --verbose` I get error: ```bash DEBU[0000] Loading environment from /xxxx/.env DEBU[0000] Loading secrets from DEBU[0000] Loading workflow '/xxxx/.github/workflows/two.yml' DEBU[0000] Reading workflow '/xxxx/.github/workflows/two.yml' DEBU[0000] Planning event: workflow_run FATA[0000] Unable to build dependency graph! ``` Could anyone give me a hand with triggering 'secondary' workflow files? For `workflow_run` see: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_run
kerem closed this issue 2026-03-01 21:41:58 +03:00
Author
Owner

@aldegoeij commented on GitHub (Oct 14, 2020):

Ok sorry, no teddy bears during Corona...

I still had an needs: on the jobs in two.yml as I split the jobs off, sorry, works like a charm like this:

act workflow_run --workflows ./.github/workflows/two.yml

👋

<!-- gh-comment-id:708415012 --> @aldegoeij commented on GitHub (Oct 14, 2020): Ok sorry, no teddy bears during Corona... I still had an `needs:` on the jobs in `two.yml` as I split the jobs off, sorry, works like a charm like this: `act workflow_run --workflows ./.github/workflows/two.yml` 👋
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#276
No description provided.