Skip to content

feat: add support for workflow_dispatch trigger #459

@rdhar

Description

@rdhar

Originally posted by @eumpek in #393 (reply in thread)

I am facing a problem and would appreciate your input.

The workflow I'm trying to set up goes like this

  1. Dev opens PR and terraform plan is executed on stage environment (stage terraform workspace is used too)
  2. Dev merges the PR and apply(push to master) is executed automatically on stage environment.
  3. Another action will run on push to master pointing to production this time that will execute plan (also nicely posting a comment to the merged PR)
  4. Now I want to manually deploy to prod by running the workflow ( using workflow_dispatch)

This is where I am blocked. If I try to manually run the workflow on master it's not able to figure out the plan file as you pointed out here. I checked the code, and this is happening because of this line here. If it enters this condition, it will correctly infer the PR number from the associated commit and then fetch the plan file.

Is there a reason that you did not allow workflow_dispatch to enter this condition

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions