|
@@ -28,18 +28,43 @@ Usage of github-release-redirector:
|
28
|
28
|
if specified, requests for / will be redirected to this url
|
29
|
29
|
-repo string
|
30
|
30
|
the repository to redirect releases for, in user/repo format [required]
|
|
31
|
+ -webhook string
|
|
32
|
+ full path to receive release webhooks from GitHub on
|
31
|
33
|
```
|
32
|
34
|
|
33
|
35
|
## Notes
|
34
|
36
|
|
|
37
|
+### Root redirecting
|
|
38
|
+
|
35
|
39
|
If the `-redirect` option is specified, then requests to the root (i.e. `/`)
|
36
|
40
|
will be redirected to that URL, and no further processing will be done for
|
37
|
41
|
that request.
|
38
|
42
|
|
|
43
|
+### Polling and webhooks
|
|
44
|
+
|
39
|
45
|
Releases are refreshed at startup and then, by default, once an hour. You can
|
40
|
46
|
customise this duration with the `-poll` option; setting the poll time to `0`
|
41
|
47
|
will disable polling entirely other than at startup.
|
42
|
48
|
|
|
49
|
+As an alternative to polling, you can configure a webhook URL with the
|
|
50
|
+`-webhook` argument. This must be the full URL that GitHub will call
|
|
51
|
+when a release is made, and it is advisable to include a secret in the
|
|
52
|
+URL to avoid any client on the Internet being able to trigger a refresh.
|
|
53
|
+
|
|
54
|
+For example if you run with `-webhook /webhook/gjrCBVy7`, you
|
|
55
|
+should configure GitHub to send pull requests to
|
|
56
|
+`https://yourserver.example.com/webook/gjrCBVy7`. You should configure
|
|
57
|
+the WebHook to only send individual events, and select only the
|
|
58
|
+`Releases` option.
|
|
59
|
+
|
|
60
|
+The contents of the webhook are not used; it is merely used as a signal
|
|
61
|
+to start a refresh using the GitHub API.
|
|
62
|
+
|
|
63
|
+When running with the `-webhook` option it is recommended to also disable
|
|
64
|
+polling with `-poll 0`, or set the polling time to a much larger value.
|
|
65
|
+
|
|
66
|
+### Asset matching
|
|
67
|
+
|
43
|
68
|
Assets are matched on their name, so an asset attached to the latest release
|
44
|
69
|
named "myproject-installer-1.2.3.exe" will be available at the URL
|
45
|
70
|
`/myproject-installer-1.2.3.exe`.
|
|
@@ -48,9 +73,23 @@ Any url not mapped to an asset is responded to with a 404 not found error;
|
48
|
73
|
if there is no latest release available all requests will respond with 500
|
49
|
74
|
internal server error.
|
50
|
75
|
|
|
76
|
+### HTTPS
|
|
77
|
+
|
51
|
78
|
The service listens only on HTTP, not HTTPS. For production use it should
|
52
|
79
|
be placed behind an SSL-terminating proxy such as Traefik, Nginx or HAProxy.
|
53
|
80
|
|
|
81
|
+## Contributing/further work
|
|
82
|
+
|
|
83
|
+This performs the job I wrote it to do, so it's unlikely I'll be developing
|
|
84
|
+any further features. If you're using this and would like to send a pull
|
|
85
|
+request for a feature I'd be happy to review and merge.
|
|
86
|
+
|
|
87
|
+In particular I'd welcome the following:
|
|
88
|
+
|
|
89
|
+- [ ] HTTPS support (specifying certs/keys/etc)
|
|
90
|
+- [ ] Support for GitHub's secret digests, instead of using a secret URL
|
|
91
|
+- [ ] Parsing of the WebHook content to avoid refreshing needlessly
|
|
92
|
+
|
54
|
93
|
## Licence
|
55
|
94
|
|
56
|
95
|
This software is released under the MIT licence. See the LICENCE file for
|