nathandeamer/github-release-checker

By nathandeamer

Updated almost 3 years ago

Count the number of commits between default branch and tag and send to Slack

Helm
Image
0

266

nathandeamer/github-release-checker repository overview

Github Release Checker

Send a notification to slack counting the number of commits the github configured default branch (main/master) is behind the tag prod. If tag is not found, repo will be ignored

Example

Incoming Webhook

Prerequisites

  • On release to production, the git-sha should be tagged with the GITHUB_TAG value (default: prod) by your CI/CD pipeline

  • Slack webhook configured
    Configure the incoming webhooks slack integration

  • Github Github Personal Access Token created
    Note: Github Release Checker
    Expiration: No Expiration
    Scopes: repo:status

Usage

The application will exit after it has finished running. It has been designed to be ran as a cron job.

  1. Set environment variables:
    GITHUB_USER OR GITHUB_ORGANISATION
    GITHUB_TOKEN
    GITHUB_TAG default prod
    SLACK_WEBHOOKURL
    THRESHOLD_CRITICAL default 3
    EXCLUDED - list of repo names to ignore

Installation (k8s)

TODO: Build a helm chart (cronjob)

Local usage:

  1. Build the image: ./gradlew bootBuildImage --imageName=nathandeamer/github-release-checker
  2. Run with docker:
docker run \
  --env GITHUB_ORGANISATION/GITHUB_USER=x \
  --env GITHUB_TOKEN=x \
  --env SLACK_WEBHOOKURL=x \
  --rm nathandeamer/github-release-checker

Tag summary

Content type

Helm

Digest

sha256:f28cec4d6

Size

2.3 kB

Last updated

almost 3 years ago

helm pull oci://registry-1.docker.io/nathandeamer/github-release-checker --version 0.1.8