Can i use action as a full job to encapsulate all CI process? #25072
-
What i want to reach is encapsulate all CI process in one action. What can i do now
But how turn it into something like this?
The main reason is reduce duplicated code that needs to be maintained. For example, Jenkins has shared libraries that allows to do such thing. Does GitHub Actions support such type of encapsulation? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Your request is quite similar with job/step templates, just like the Templates feature for YAML pipelines on Azure Pipelines. |
Beta Was this translation helpful? Give feedback.
-
Would you know if such a feature is planned? This thread indicates there is an open feedback issue for this: https://github.community/t5/GitHub-Actions/Being-DRY-centralized-workflows/td-p/34485 If we cannot service many projects with the same pipeline logic like we can with Jenkins shared libraries, it is impossible to switch to GitHub Actions without creating a large maintenance burden on the pipelines themselves. Some provision for keeping the configurations in the project repositories as small as possible is needed for that. |
Beta Was this translation helpful? Give feedback.
Your request is quite similar with job/step templates, just like the Templates feature for YAML pipelines on Azure Pipelines.
I tested and tried, unfortunately, GitHub Actions seems does not support job/step templates. And it also is very hard to encapsulate multiple jobs/steps into one action.
Looks like, currently we have no available methods to encapsulate multiple jobs/steps into one action, or setup job/step templates.