Skip to content

Commit 3f4a6dc

Browse files
test: make sure workflow_call is not a github event calling our workflow (#1520)
Since reusable workflows are defining inputs and ouputs using the on.workflow_call syntax, this could also be triggered by a workflow_call event. That event does not exist within GitHub and we should make sure our worklow is not called by that kind of 'synthetic' event. See https://github.com/nektos/act/pull/1423/files/74da5b085c0c4d08c5e5bf53501e555cb585b26c#r1042413431 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent b14398e commit 3f4a6dc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: pkg/runner/testdata/.github/workflows/local-reusable-workflow.yml

+5
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ jobs:
6868
echo secrets.secret=${{ secrets.secret }}
6969
[[ "${{ secrets.secret == 'keep_it_private' }}" = "true" ]] || exit 1
7070
71+
- name: test github.event_name is never workflow_call
72+
run: |
73+
echo github.event_name=${{ github.event_name }}
74+
[[ "${{ github.event_name != 'workflow_call' }}" = "true" ]] || exit 1
75+
7176
- name: test output
7277
id: output_test
7378
run: |

0 commit comments

Comments
 (0)