Reusable Workflows - how to reference own called repo from within a reusable workflow? #18602
Replies: 2 comments 3 replies
|
You can use |
|
@HariSekhon Currently we don't have context that has reusable workflow details (like called repo / called workflow path etc). From docs: https://docs.github.com/en/actions/using-workflows/reusing-workflows Regarding the #18601 , please check the workaround https://github.com/orgs/community/discussions/18601#discussioncomment-4898425 In future, may be we can have a context like |
Uh oh!
There was an error while loading. Please reload this page.
Related to #18601, is there any way to reference the repo of a reusable workflow within the reusable workflow steps itself, via something like the
envorgithubcontexts?I've dumped all the contexts by calling a reusable workflow version which dumps all its contexts, but couldn't find anything appropriate:
https://github.com/HariSekhon/GitHub-Actions/blob/master/.github/workflows/dump_contexts.yaml
I could see this at the top of the logs:
but no other reference in the logs from all the dumped contexts that would be usable to find out the reusable workflow's repo in a portable programmatic way that I could reference in the reusable workflow itself (to source things from the reusable workflow's repo).
The use case for this would be as a workaround for issue #18601.
All reactions