Skip to content
This repository was archived by the owner on Mar 16, 2022. It is now read-only.

richard1122/GithubReleaseHook

Repository files navigation

GithubReleaseHook

Github Release Hook is a tool to handle Github release event and run script.

更多细节请见中文博客: blog.hlyue.com

Usage

Currently I only produce docker.

Windows & Linux are primary supported platform.

You can write your own project's Dockerfile and repo.yml, your Dockerfile should FROM richard1122/GithubReleaseHook.

Usage

Github Webhook

Add webhook to your docker exposed port. Select Let me select individual events. and only check Release. Other events will be droped silently.

For security, you should generate unique secret key and keep it secret.

Dockerfile

A very simple Dockerfile, copy repo.yml (will discuss later) into /usr/src/app/ (which is GithubReleaseHook source dir).

FROM richard1122/githubreleasehook
RUN mkdir /blog
VOLUME /blog
COPY repo.yml /usr/src/app/

Repo.yml

The following is a sample repo.yml for my blog.

Add one or more filenames in file directive. GithubReleaseHook will automaticly download it. Then reference each file in script directive like $f0 for the first file.

Secret is an important key to ensure event is sent by Github. Please keep it secret.

repo: richard1122/blog.hlyue.com
file:
    - release.tar.gz
script:
    - tar xavf $f0
secret: sec
workingDir: /blog

Nginx

Your static file server might be Nginx running outside docker. Add Docker Volumn to /blog of your Docker.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages