gitlab-ci-github-status-checks
A small HTTP server that updates GitHub commit status checks when GitLab job status webhook events occur.
With this and git-mirror-docker
, you can get the functionality of GitLab.com's "GitHub Integration" (no longer free after 2020) and GitLab EE's "GitHub Integration" using a regular GitLab CE installation.
Available Env Vars
GH_TOKEN
- (required) GitHub personal access token for creating status checksWEBHOOK_SECRET
- (required) Pre-shared webhook secret Default: noneWEBHOOK_PATH
- Path to POST GitLab webhook events to. Default:/.gl-webhook
PORT
- Port to listen on. Default:3000
Docker Info
There is a Dockerfile
that sets up and runs this service.
Docker Hub: https://hub.docker.com/r/flotwig/gitlab-ci-github-status-checks
docker run
Sample This sets up the webhook at http://0.0.0.0:12345/.gl-webhook
.
docker run -p 12345:3000 \
--restart=always \
-e GH_TOKEN=your-personal-access-token \
-e WEBHOOK_SECRET=your-gitlab-webhook-pre-shared-secret \
flotwig/gitlab-ci-github-status-checks:latest
docker-compose.yml
Sample ⚠ Protip: You can even run this in the same
docker-compose.yml
as yourgitlab-runner
andgitlab-ce
(andgit-mirror-docker
) images.
This sets up the webhook at http://0.0.0.0:12345/.gl-webhook
.
ci-status-checks:
image: 'flotwig/gitlab-ci-github-status-checks:latest'
restart: always
ports:
- '12345:3000'
environment:
- GH_TOKEN=your-personal-access-token
- WEBHOOK_SECRET=your-gitlab-webhook-pre-shared-secret
Notes
- Commit status checks will be pushed from the original
namespace/repo
to the sameowner/repo
on GitHub. So make sure your repos exist and line up. - This works best if you're mirroring commits from GitHub to GitLab, so the commit is guaranteed to exist on GitHub by the time the status check is made.
- An easy way to do commit mirroring is with
git-mirror-docker
- An easy way to do commit mirroring is with