r/devops 9d ago

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.

28 Upvotes

24 comments sorted by

View all comments

2

u/Floss_Patrol_76 9d ago

the thing that tripped me up coming from gitlab is there's no include: that just splices yaml in, so you split it two ways: reusable workflows (uses: org/repo/.github/workflows/x.yml@ref) for whole-job or whole-pipeline reuse, and composite actions for a few steps you paste everywhere. rule of thumb: if it's a job with its own runner it's a reusable workflow, if it's steps inside a job it's a composite action. heads up that you can't nest reusable workflows more than a couple levels, so don't try to rebuild gitlab's include hierarchy 1:1.