Local composite actions always relative to top level repository
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Describe the bug
I'm building a set of actions for my organization, and I would like to re-use common sections as composite actions. This appears to be the motivating case around https://github.com/actions/runner/issues/646, and it certainly suits my needs.
However: I have a pattern like:
main repo
- uses: actions/checkout@v2-beta # check out your code
- uses: actions/checkout@v2-beta # check out the actions repo
with:
repository: my-org/github-actions
ref: refs/tags/v1
path: github-actions
- name: Run the private action
uses: ./github-actions/build-em-all
then in my-org/github-actions /build-em-all/action.yml
#...
- uses: ./do-tedious-setup
My dilemma here is that the above won't work - the action is looked up relative the the consumer's workspace; so it should be - uses: ./github-actions/do-tedious-setup - but that's entirely dependent on the checkout in the consumer! The actions library has to expect that it's checked out in the right directory, which itself imposes a restriction on the file structure of consuming projects.
Even if I were to parameterize the checkout location, the uses field (probably rightfully) doesn't get any contexts to work from, so I can't deliver the input.
For the moment, I'm settling on documenting the requirement and hoping it doesn't cause a problem.
Expected behavior
It'd be great if actions were looked up with a Bash style PATH behavior and that a workflow could append items to the lookup list.
Runner Version and Platform
Version of your runner? Github hosted ubuntu-latest
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the workflow's uses field resolves local composite actions, then compare that behavior with the nested action.yml example in build-em-all. Determine how resolution could use the checked-out action library rather than the consumer workspace, and define completion as nested actions working without requiring a fixed checkout directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, github-actions
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100