Skip to content

This repository contains a FastAPI application named "gatekeeper" that listens to GitHub webhooks for repository events. When a new repository is created in an organization, it triggers a specified GitHub Actions workflow via the GitHub API. This automation aids in managing GitHub users and streamlines workflow initiation upon repo

Notifications You must be signed in to change notification settings

GlueOps/gatekeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatekeeper

send webhooks to this app to run github user management

Developer setup

  • Create a GitHub organization for testing
  • Create a fine-grained access token
    • Restrict to a single repository that contains the workflow(s) you want to trigger
    • Repository permissions should be:
      • Read access to metadata
      • Read and write access to actions
  • Create a workflow to call (or use github user management workflow)
  • Setup webhooks at organization level:

Required env variables

GITHUB_DISPATCH_URL=https://api.github.com/repos/<GITHUB_ORG_NAME>/<GITHUB_REPO_NAME>/actions/workflows/<WORKFLOW_TO_CALL>.yaml/dispatches
GITHUB_TOKEN=<PAT_TOKEN>

About

This repository contains a FastAPI application named "gatekeeper" that listens to GitHub webhooks for repository events. When a new repository is created in an organization, it triggers a specified GitHub Actions workflow via the GitHub API. This automation aids in managing GitHub users and streamlines workflow initiation upon repo

Topics

Resources

Stars

Watchers

Forks

Packages