docs icon indicating copy to clipboard operation
docs copied to clipboard

Document limitation with reusable workflows

Open unchris opened this issue 3 years ago • 4 comments

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations

What part(s) of the article would you like to see updated?

The Limitations section.

If you create a reusable workflow in repository A and that workflow uses a composite action defined also in repository A, you cannot use the reusable workflow from repository B.

This community discussion does a good job illustrating the issue, but basically the upstream workflow assumes that the composite action will be in the context of repository B's files when it should be looking in repository A's files.

The error you receive in repository B's actions output is similar to the below, which I copied from the linked discussion thread:

Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/work/CLIENT/REPO/generate-docker-tags@master'. Did you forget to run actions/checkout before running your local action?

Additional information

No response

unchris avatar Dec 16 '22 21:12 unchris

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

welcome[bot] avatar Dec 16 '22 21:12 welcome[bot]

Just wondering: it sounds like it would be trivial to fix the runner software to look in the right repo, but the security aspect might not be as simple? (checking for allowed actions)

Simran-B avatar Dec 19 '22 07:12 Simran-B

@Simran-B Thank you for opening an issue and linking it to your PR! ✨

cmwilson21 avatar Dec 19 '22 22:12 cmwilson21

Just wondering: it sounds like it would be trivial to fix the runner software to look in the right repo, but the security aspect might not be as simple? (checking for allowed actions)

Indeed, I'd be happy to withdraw this issue and PR if GitHub can instead remove the limitation. It would be great to have Reusable Composite Actions

unchris avatar Dec 21 '22 17:12 unchris