Describe the bug
I'm reusing workflow by calling it from another repo, like:
jobs:
test:
uses: org/repo/.github/workflows/test.yml
And inside re-used workflow I've defined the following condition:
on:
workflow_call:
jobs:
cleanup:
if: ${{ github.event_name != 'workflow_call' }}
runs-on: ubuntu-latest
steps:
- uses: geekyeggo/delete-artifact@v4
with:
name: *
The issue is that if: ${{ github.event_name != 'workflow_call' }} condition doesn't work.
Expected behavior
I'm expected that job not to run from the calling workflow (uses: org/repo...).
So I want to call the job when I'm running workflow in the same repo.
Runner Version and Platform
2.312.0
OS of the machine running the runner?
Linux
What's not working?
Condition doesn't work as expected.
It's possible that conditions for workflows calls are ignored, because I've tested with different condition, and it didn't work either.
Describe the bug
I'm reusing workflow by calling it from another repo, like:
And inside re-used workflow I've defined the following condition:
The issue is that
if: ${{ github.event_name != 'workflow_call' }}condition doesn't work.Expected behavior
I'm expected that job not to run from the calling workflow (uses: org/repo...).
So I want to call the job when I'm running workflow in the same repo.
Runner Version and Platform
2.312.0
OS of the machine running the runner?
Linux
What's not working?
Condition doesn't work as expected.
It's possible that conditions for workflows calls are ignored, because I've tested with different condition, and it didn't work either.