/gitlab-webhook

GitLab Webhook receiver written in PHP

Primary LanguagePHPMIT LicenseMIT

gitlab-webhook

GitLab Webhook receiver written in PHP

How to use it

  1. Clone repo or download index.php

  2. Create a vhost or copy the file to some browseable location

  3. Create your config file based on example

     {
       "token": "10b3df25867af8bbfb182f76728592cc0b1956d6",
       "git": "/usr/bin/git",
       "log": "/var/log/apache/webhook.log",
       "develop": {
         "target": "/var/www/develop"
       },
       "master": {
         "target": "/var/www/production"
       }
     }
    
  4. Configure GitLab Webhook

  5. Enjoy!

Note: the script look for the config file at /etc/webhook/config.json, you can change that location at the first line of the php file