You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve usability when nesting composite actions in a monorepository #2101
Using an action from the same repository inside a composite action is very inconvenient at the moment. Imagine the following directory structure:
root
:. actions
: :. a
: :. b
If we use action b as a step of action a, we are very limited in a way that we have to choose one of the following options:
Use the repository syntax
- uses: user/repo/actions/b@ref
This is extremely bad for maintainability as we always have to hardcode a specific ref in the caller action. When bumping the version from v1 -> v2 we have to change this part in all places. We as well can not simply use master as this would break the action for everybody who pinned it to a specific tag. It's even worse if the caller pinned the action to a specific commit hash.
Copy to $GITHUB_WORKSPACE
When referencing an action using a relative path, the path is always relative to $GITHUB_WORKSPACE.
While this works perfectly fine and we as well make sure that the same ref is used for a and b, it still adds boilerplate code to the action and as well could cause problems, if the checked out repository already contains a .actions directory. Besides that, we have to pay extra attention to always copy when using different refs like user/repo/actions/a@v1 for one step and user/repo/actions/a@v2 for another one (even tho that's an unlikely to happen scenario).
Proposed solution
Allow actions to be referenced using pathes relative to the action repository. To remain backwards compatibility, a syntax like this could be implemented:
- uses: $ACTION_ROOT/actions/b
where $ACTION_ROOT points to the root directory of the repository that contains action.
- uses: $ACTION_PATH/../b
where $ACTION_PATH points to the directory that contains the current action (alias for github.action_path).
Sorry for the late response. Thank you for submitting this issue! Since it is related more to the platform more generally, could you please post your feedback on the GitHub Feedback site, which is actively monitored. Using the forum ensures that we route your feature to the correct team ☺️ I will leave this issue here with the Service Feature label.
We've been working on a solution very similar to what was proposed here. We're introducing a new $/ syntax (similar to the $ACTION_ROOT idea):
# In actions/a/action.yml
- uses: $/actions/b # same repo, same SHA
When someone uses user/repo/actions/a@v2, the $/actions/b automatically resolves to user/repo/actions/b@v2. No hardcoding, no version drift, no workspace copying.
I've posted the full proposal over in community#26245. We'd love your feedback there!
Activity
nikola-jokic commentedon Oct 3, 2022
Hey @flobernd,
Sorry for the late response. Thank you for submitting this issue! Since it is related more to the platform more generally, could you please post your feedback on the GitHub Feedback site, which is actively monitored. Using the forum ensures that we route your feature to the correct team☺️ I will leave this issue here with the
Service Featurelabel.nikola-jokic commentedon Mar 22, 2023
Closed this one due to new contribution guidelines.
ericsciple commentedon Jan 26, 2026
Hi @flobernd 👋
We've been working on a solution very similar to what was proposed here. We're introducing a new
$/syntax (similar to the$ACTION_ROOTidea):When someone uses
user/repo/actions/a@v2, the$/actions/bautomatically resolves touser/repo/actions/b@v2. No hardcoding, no version drift, no workspace copying.I've posted the full proposal over in community#26245. We'd love your feedback there!
— The GitHub Actions Team