How to run a workflow (docker/build-push-action@v6 based), based on successful run of another github action #177923
-
| Why are you starting this discussion?Question What GitHub Actions topic or product is this about?Actions Runner Discussion DetailsI have he following github action: If this action is successful, another one should be triggered on main: The first one (Run Inference Tests) was triggered and finished successfully, but the second one (Build and Push Docker Images) wasn't triggered and moreover, it didn't even appear in the list of checks. What did I do wrong here? | 
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
| The issue likely comes from how workflow_run triggers behave in GitHub Actions. A few key points to check: on: Events from forked repositories Fix suggestion: Make sure both workflows are on main. 
 …to confirm the event payload is being recognized. | 
Beta Was this translation helpful? Give feedback.
The issue likely comes from how workflow_run triggers behave in GitHub Actions.
A few key points to check:
Workflow visibility and permissions
Make sure both workflows are defined in the same repository under .github/workflows/.
The workflow you want to trigger (Build and Push Docker Images) must already exist on the default branch (main in your case).
If you just added it on a feature branch, it won’t trigger until it’s merged into main.
YAML indentation / structure
Your on: section in the second workflow looks correct, but double-check that it’s properly aligned like this:
on:
workflow_run:
workflows: ["Run Inference Tests"]
types:
- completed
branches:
- main
Events from forked reposit…