Executing external GitHub action from shell or JS scripts

I want to run GitHub action from my shell or JS script. For example actions/setup-go.

I know that I can clone the git repo ( github.com/actions/setup-go ), parse the action.yml and run whatever is there, but that sounds too cumbersome. I assume there is a better, actually supported way and I just can’t find it in the docs.

Thanks in advance,

Vilius

There is no supported model to run an action from your own script. 

1 Like

I see.

Is there a way to include custom yml in a workflow?

My problem is that I have some common steps within multiple jobs and I would like to not repeat everything multiple times.

This implies that you can not call an action from an action (a.k.a. killing  action-** c**omposition), right?

Unfortunately this makes the github actions DSL an extremely limited programming language.

Until now I discovered: minimal  if , no  loops and no composition.

This basically boils down to a single level sequential list of commands, only suitable for simple use-cases. Duplication is my only resort, which is not particularly state-of-the-art :-(.

  • What was the reasoning behind this design?
  • Are there any plans to introduce composition and/or loop-constructs at a later stage?

Regards,

Tom

P.S. Don’t get me wrong here, I like github actions a lot for what it can do and how easy it is to use and extend. I love it so much that I would like to use it for more and more… but that requires a more and more mature DSL…

So, keep up the good work and keep evolving!

1 Like

The ability to compose new actions out of other actions in order to create reusable chunks of workflow is something we are working on but I don’t have a firm delivery date.

4 Likes

That’s great!