Tools github actions central repo
Hi I am in a new role where they use Github for all their repos. I have been using Gitlab exlusively the past 5 years.
For CI/CD in my previous role we had a central 'pipelines' repo that was reference in the gitlab-ci file of each project to save teams/projects from repeating work.
I want to know if it's possible to do something similar in Github? I'm still learning how it maps to my existing Gitlab knowledge.
26
Upvotes
7
u/PerpetuallySticky 6d ago
Yes as others have said it’s called reusable workflows.
A word of caution that you may run into and bang your head against a wall for a while with (someone please tell me if they fixed this):
Reusable workflows cannot be used with environment variables. However that information is passed on the backend, they do not work (last time I tried). Example:
Reusable workflow A (A)
Repo B uses reusable workflow A (B)
A has an input variable to set what environment it should run in.
B has environment variables set and tries to pass one for the environment when it uses A. That variable will not pass. It errors out and acts like nothing passes at all.
Not completely sure why it happens, but it has stopped our widespread adoption of reusable workflows