Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call a github action from another github action? [duplicate]

Tags:

Is it possible to call one (or many) github action from a github action to create a more specialized one, or aggregate many small actions and create a "meta github action" ?

like image 598
Antoine Avatar asked Nov 14 '19 15:11

Antoine


People also ask

Can a GitHub action call another action?

You can't package up a composite action that can call other actions, at least not yet. Pretty new: https://github.blog/changelog/2021-08-25-github-actions-redu...

How do I call one workflow from another workflow in GitHub Actions?

You call a reusable workflow by using the uses keyword. Unlike when you are using actions within a workflow, you call reusable workflows directly within a job, and not from within job steps.

Can a reusable workflow call another reusable workflow?

If you have a reusable workflow in a private repository, only other workflows in that private repository can use it. Reusable workflows can't be stacked on top of one another. You can only have a reusable workflow call another reusable workflow, but you can't have it reference more than one.

Do GitHub Actions jobs run in parallel?

You can configure a GitHub Actions workflow to be triggered when an event occurs in your repository, such as a pull request being opened or an issue being created. Your workflow contains one or more jobs which can run in sequential order or in parallel.


1 Answers

There is no built-in feature to do this that I'm aware of.

This is a related question where the original poster replied with a workaround that involves using the NPM packages published from other actions. How can I reference other actions from my GitHub Action's action.yml file?

I have a similar situation in which I would like actions/setup-python to be released as an NPM package so I can use it in my Javascript action.

like image 147
peterevans Avatar answered Oct 22 '22 14:10

peterevans