Hacker News new | ask | show | jobs
by kylorhall 1741 days ago
I use a lot of composite actions in the same repo as well as composite actions across repos.

Eg. `workflow1` and `workflow2` both call `composite/action`:

.github/workflows/workflow1.yml

.github/workflows/workflow2.yml

.github/actions/composite/action.yml

The only missing bit in that is a bit more support in a composite action: `if` and a few other keywords. Also, it's a bit annoying to access private across across repos.

3 comments

I use zero because of all the showstopping bugs and lack of any introspection or input validation. It saves me a lot of time and money.
First, thank you. I have been looking for a way to do this and came to the comments to see if there were workarounds to use composite actions without putting them in a separate repo.

Which brings me the second comment... this is proof the docs suck. I have looked and looked for any evidence that this exact scenario was possible. There are no examples or documentation of this feature anywhere that I could find.

Absolutely agree. Docs are either perfect (5%) or…completely obscure (95%). I can't tell the difference between Github Actions and API documentation in places, but I desire functional examples. No clue where I built it up, but I'm comfortable now…lots of trial and error.

For a lot of Github Actions, I actually follow the Github Roadmap through to implementation as the PRs actually have good examples in them… https://github.com/github/roadmap/projects/1

Is it still one action per repo?
Nope, I have a repo consuming 10+ workflows, 3 shared actions, and a handful of private workflows (the way private workflows sucks now though, don't recommend–basically just a git clone into your Github Action).

This is all non-Enterprise, private repos, no clue in GHEC/S.