Skip to content

codelabsab/workflow-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workflow Manager

⚠️ This project isn't being actively maintained.

If you're interested in helping out maintaining, please write in this discussion

Hello there! 👋

Thank you for taking the time to check out this project.

Looking to contribute? Great! Please read the contribution guidelines first.

Do you use github actions? Maybe you use it to run workflows that should do something at a specific date and time.

This is an app that will be able to dynamically import and schedule GitHub workflows.

Features

  • Github integration
    • Authentication
    • Importing repositories and workflows
    • Triggering workflows

Getting started

Quick start local development

The repository comes with a local docker-compose that can be used for development.

  1. Start ngrok to handle incoming webhooks from GitHub. See the development readme for more details

    ngrok http 3000
  2. Create the GitHub App

  3. Copy example env file and update the values needed

    cp .env-example .env
  4. Build and start the local docker compose containers

    docker compose up --build -d
  5. Push the database schema to the database

    docker compose exec frontend npx prisma db push

Now you should be able to browse to http://localhost:3000

Architecture

The application is built using Typescript, Next.js, tRPC, tailwindcss, and Prisma.

Authentication is done with NextAuth.js and using GitHub as the main Provider.

The application relies on incoming webhooks to receive events from GitHub. To solve this when developing locally behind a NAT router we have used ngrok. Note that ngrok is not a requirement but one of many webhook development tools.

Scheduling

The code that handles the scheduling at the moment quite simple.

  1. First we have a special private api endpoint that will find all of the scheduled workflows that should be fired in github at the current point in time.
  2. The second part consist of some small script that will make a http request to that endpoint every minute.

About

A web app to schedule github action workflows

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks