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 74da5b085c (r1042413431)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Markus Wolf 2023-01-10 22:43:12 +01:00 committed by GitHub
parent b14398eff3
commit 3f4a6dc462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -68,6 +68,11 @@ jobs:
echo secrets.secret=${{ secrets.secret }}
[[ "${{ secrets.secret == 'keep_it_private' }}" = "true" ]] || exit 1
- name: test github.event_name is never workflow_call
run: |
echo github.event_name=${{ github.event_name }}
[[ "${{ github.event_name != 'workflow_call' }}" = "true" ]] || exit 1
- name: test output
id: output_test
run: |