Chain workflows by repository_dispatch? #160128
Unanswered
ckeller-microstar
asked this question in
Actions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
My use case is that I'm attempting to support two CI/CD workflows. I have two separate
workflow_dispatch
jobs for build+upload and deploy. For production deployments we want those jobs separated so we can prep resources and then swap them quickly, but for development environments, I'd like to chain those two actions, one after another.My first approach was to include in the build+upload job's
workflow_dispatch
inputs a boolean to specify whether to trigger the deploy workflow afterward. When enabled, this would usepeter-evans/repository-dispatch@v3
to trigger the deploy job, which could be triggered byon: repository_dispatch
. I got pretty far prototyping that, but ultimately got this error in build+upload when using therepository-dispatch
action:At this point I switched gears to using two reusable
workflow_call
workflows with the bulk of each action (build+upload and deploy) with threeworkflow_dispatch
jobs (build+upload only, deploy only, and both) to kick off the relevant sub-jobs, and I made a separate post about the issue I'm facing there. But, at a high level, does usingrepository_dispatch
seem like a reasonable approach to the problem, or should I abandon this?Beta Was this translation helpful? Give feedback.
All reactions