Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 3

How to reuse a whole workflow?

Solved! Go to Solution.

Hello everybody,

 

I think I had a fundamental misunderstandig of Actions. So let me ask something first:

 

A job in a workflow consists of one more more steps. Steps can use other Actions. But an Action is something else than a workflow, as an Action executes only a single command.

 

Is this correct?

 

If my current understanding is correct, how can I share an entire workflow with multiple steps with multiple repositories?

 

Best,

Oliver

2 Replies
Highlighted
Solution
Commander Lvl 1
Message 2 of 3

Re: How to reuse a whole workflow?

Hey! If you are a little fuzzy on what a GitHub action is and how it's used, check out this link: https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#about-gi...

 

From the docs: "You can write individual tasks, called actions, and combine them to create a custom workflow"

 

If I am understanding your question right, you want to share a workflow between repos? I am not sure you have have a shared set of workflows between repos. The workflows and actions operate on a repo by repo basis. 

 

If you want to copy a workflow from one repo too another, you will need to copy the ".github" folder from one repo to the next. This will move over all of your workflows and subsequent actions. 

Copilot Lvl 2
Message 3 of 3

Re: How to reuse a whole workflow?


From the docs: "You can write individual tasks, called actions, and combine them to create a custom workflow"


 

Yes, I missed this sentence. 😕 But this is that I was afraid of. It would be nice to be able to share workflows.

 

I will see that fits best my use case. Copying or using a Git submodule.