Github action manual execution not working
Asked Answered
J

2

10

I have 3 different workflows in a project configured at top as:

plan_streamline.yml

name: plan

on:
  push:
    branches:
      - main
  workflow_dispatch:

...
   

terrform_import.yml

name: terraform_import

on: workflow_dispatch
...

plan.yml

on:
  push:
    branches:
      - main
  workflow_dispatch:

But within the github action I do not see the ability to manually execute any of the workflows, as I should be seeing something like https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/

What is wrong with my workflow configuration?

Jo answered 2/11, 2020 at 21:17 Comment(7)
You can't filter the workflow_dispatch event by branch, but simply having it there as a trigger should make the button in the actions tab show up.Mycostatin
@BenjaminW. Updated my question, it still does not work...Jo
Is the workflow with that trigger merged into the default branch?Mycostatin
@BenjaminW. every workflow has the trigger so yes every branch has thisJo
If your repo is public, can you link to it?Mycostatin
@BenjaminW. I did not merge the branch with the new workflows to the default branch so that option did not appear...it's fine nowJo
I wonder if there might be a syntax / validation error for the YAML? That was my problem. Maybe try this? github.com/mpalmer/action-validatorChinfest
J
21

Merged the branch with the new workflows to the default branch so that option appears now

Jo answered 5/11, 2020 at 2:2 Comment(0)
F
0

According to the information on this page, in the section "Configure branches", the following:

name: Manual Trigger Workflow

on:
  workflow_dispatch:
    branches:
      - main

should work for any branch specified.

Filemon answered 23/6, 2023 at 12:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.