Skip to content

Commit

Permalink
test: make sure workflow_call is not a github event calling our workflow
Browse files Browse the repository at this point in the history
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
  • Loading branch information
KnisterPeter committed Dec 19, 2022
1 parent bef9b5c commit a94421f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit a94421f

Please sign in to comment.