From: Michael Wallner Date: Wed, 23 Jan 2019 16:09:00 +0000 (+0100) Subject: Add configuration snippet to showcase env vars X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fgh-mirror;a=commitdiff_plain;h=a57f79e5485f3ef46d99f51d9957656575583b34;hp=9c0f96f197b1a5a95d5a5f37b273f40524e34728 Add configuration snippet to showcase env vars --- diff --git a/README.md b/README.md index f93e5ba..6c3c792 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,14 @@ Simple PHP webhook to mirror github repositories. * [pecl/http](https://github.com/m6w6/ext-http) +## Configuration + +```php +$mirror = getenv("mirror") ?: "/var/github/mirror"; +$secret = getenv("secret") ?: trim(file_get_contents("$mirror/.secret")); +$owners = explode(",", getenv("owners") ?: trim(file_get_contents("$mirror/.owners"))); +``` + ## License gh-mirror is licensed under the 2-Clause-BSD license, which can be found in