Unfortunately, GitLab and GitHub use different syntaxes and configurations for their workflow files, so I cannot directly reuse GitHub workflow files in GitLab pipelines.
Are there some plugins/actions etc. or could I use some container to apply existing GitHub workflows for my code in GitLab or vice versa?
Some include syntax or plugin for .gitlab-ci.yml
would be great.
include:
- local: translate_github_workflow_to_gitlab('.github/lint.yml')
Or is there some common workflow syntax that is supported by both platforms?
include:
- local: '.workflows/job_in_universal_workflow_syntax.yml'
Do you move your logic to custom script files and run them?
Or do you separately implement and maintain your workflows for both platforms?
I have to use GitLab for inhouse development and GitHub for OpenSource projects and would like to avoid doubled work for the automation tasks.
Unfortunately, GitLab and GitHub use different syntaxes and configurations for their workflow files, so I cannot directly reuse GitHub workflow files in GitLab pipelines.
Are there some plugins/actions etc. or could I use some container to apply existing GitHub workflows for my code in GitLab or vice versa?
Some include syntax or plugin for .gitlab-ci.yml
would be great.
include:
- local: translate_github_workflow_to_gitlab('.github/lint.yml')
Or is there some common workflow syntax that is supported by both platforms?
include:
- local: '.workflows/job_in_universal_workflow_syntax.yml'
Do you move your logic to custom script files and run them?
Or do you separately implement and maintain your workflows for both platforms?
I have to use GitLab for inhouse development and GitHub for OpenSource projects and would like to avoid doubled work for the automation tasks.
Share Improve this question edited Feb 4 at 11:14 Stefan asked Feb 4 at 11:09 StefanStefan 12.4k9 gold badges77 silver badges137 bronze badges 1- Don't mix GitLab and GitHub configuration, they are different and independent. – Daniel W. Commented Feb 4 at 11:44
1 Answer
Reset to default 1Both use a different expression language, offer different features etc. So. your main workflow files will need to be unique per platform.
But like you suggested, both platforms can run docker containers and both platforms can execute scripts, so you could move as much as possible out of your workflow files and into these re-usable solutions.