GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jessety/github-webhook: A minimal GitHub webhook listener that executes a specified command when push occurs on the default branch, or when a release is published.

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.vscode
.vscode
 
 
src
src
 
 
test
test
 
 
.editorconfig
.editorconfig
 
 
.env.defaults
.env.defaults
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
RELEASE.md.hbs
RELEASE.md.hbs
 
 
ecosystem.config.json
ecosystem.config.json
 
 
jest.config.json
jest.config.json
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

github-webhook

A minimal GitHub webhook listener that executes a script when a push event occurs on the default branch, or when a release is published.

ci

Installation

git clone ...
cd github-webhook

npm install --production
pm2 start ecosystem.config.json

Configuration

Populate an .env file in the project directory with the following options:

# GitHub Webhook Secret (required)
SECRET=ABC123

# Script to execute when a release is published
SCRIPT_RELEASE=/usr/local/bin/release.sh

# Script to execute when there is a push to the default branch
SCRIPT_PUSH=/usr/local/bin/push.sh

# Name of the default branch, if it isn't "main" or "master"
DEFAULT_BRANCH=primary

# Port to run the server on
PORT=32490

Scripts

Scripts are executed with the name of the repository as the first parameter, and the event type as the second.

Push events are only triggered when a push is made to the default branch. The script is executed with the name of that branch as its third parameter. Given the above configuration, the following will be executed a push is made to the primary branch:

/usr/local/bin/push.sh jessety/github-webhook push primary

When a release is triggered, the release tag is sent as a third parameter:

/usr/local/bin/release.sh jessety/github-webhook release v1.1.4

License

MIT © Jesse Youngblood

About

A minimal GitHub webhook listener that executes a specified command when push occurs on the default branch, or when a release is published.

Topics

github-webhookgithub-webhook-handlergithub-webhook-listener

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.