Replies: 11 comments 7 replies
-
Any reply on this Question ? @isdzulqor your Issue got resolved? |
Beta Was this translation helpful? Give feedback.
-
I believe I have similar issue. Even when the workflow is called, github.event_name is set to 'workflow_dispatch' for a some reason, I expect it to be workflow_call |
Beta Was this translation helpful? Give feedback.
-
In my action I decided to go with fake input which is present only in on:
workflow_call:
inputs:
externalCall:
description: 'To distinguish workflow_call from regular push'
type: boolean
required: false
default: true
...
# runned only from workflow_call
- if: ${{ inputs.externall_call }} It has default value so I do not have to specify it manually each time I want to use it |
Beta Was this translation helpful? Give feedback.
-
I also faced the exact same issue and it's pretty inconvenient as my workflow has both a I initially thought that the problem was lying in the fact that the caller workflow was triggered using In any case, I followed @deitry's suggestion (many thanks !) and used :
with |
Beta Was this translation helpful? Give feedback.
-
Running into this as well, I wonder if the event_name gets inherited from the calling workflow |
Beta Was this translation helpful? Give feedback.
-
Just ran into this myself :) Going to use the approach described above but it's 100% surprising when you run into it. |
Beta Was this translation helpful? Give feedback.
-
Running into this as well... why even include a "workflow_call" trigger if it won't be reflected in the |
Beta Was this translation helpful? Give feedback.
-
Same problem, when the workflow is called by another one I receive as event |
Beta Was this translation helpful? Give feedback.
-
Be aware that if your caller workflow is triggered by |
Beta Was this translation helpful? Give feedback.
-
also had the same problem, and my workaround is using github.event.workflow |
Beta Was this translation helpful? Give feedback.
-
If you're calling the workflow from another repository, one way is to hardcode its repository name, e.g.
Or add extra an input as mentioned in the other answers. Here is proposed workaround using inputs:
Then from the caller job run as:
Above is based on the comments at GH-3146. |
Beta Was this translation helpful? Give feedback.
-
I cannot use this code check
if: github.event_name == 'workflow_call'
to ensure that the trigger is coming fromworkflow_call
. It's working ok with 'workflow_dispatch' even though.My triggering action is like the following code
My question is How do you identify The trigger action that's coming from Workflow Call?
Beta Was this translation helpful? Give feedback.
All reactions