Reusable Workflows with internal reference to Action not supported #167025
-
Why are you starting this discussion?Question What GitHub Actions topic or product is this about?Workflow Configuration Discussion DetailsI expected that an Action defined in the Reusable Workflow's own Git repo could be referenced via a similar notation, however this fails to load the Action (as it's not checked out to the jobs:
deploy:
...
steps:
...
- name: Build image
uses: ./.github/actions/deploy/kaniko This error is given:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey! 👋 You're almost there — the issue is that your reusable workflow runs in the context of the calling repository, not the repo where the reusable workflow itself is defined. So when you reference a local action like If the action lives in the same repo as the reusable workflow, it won’t be available unless the calling repo also has that same path and file. That’s why you’re seeing:
✅ Workaround: - uses: your-org/your-repo/.github/actions/deploy/kaniko@v1 Let me know if you want help structuring that — ran into this same thing before 😅 |
Beta Was this translation helpful? Give feedback.
Hey! 👋
You're almost there — the issue is that your reusable workflow runs in the context of the calling repository, not the repo where the reusable workflow itself is defined. So when you reference a local action like
./.github/actions/deploy/kaniko
, it looks for that path in the calling repo, not in the reusable workflow’s repo.If the action lives in the same repo as the reusable workflow, it won’t be available unless the calling repo also has that same path and file. That’s why you’re seeing:
✅ Workaround:
To use actions from the reusable workflow’s own repo, you need to publish the action separately, or reference it by full
uses: org/repo/path@ref
syntax (…