Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 723 Bytes

README.md

File metadata and controls

33 lines (24 loc) · 723 Bytes

Django Hookflow

Trigger GitHub Actions workflows from Django.

Installation

pip install django-hookflow

Depends on:

Usage

from django_hookflow import trigger_github_workflow

@trigger_github_workflow(repo="user/repo", workflow_file="workflow.yml")
def math_add_task(a, b, save_to_file=False):
    logger.info(f"Adding {a} and {b}")
    if save_to_file:
        with open("math-add-result.txt", "w") as f:
            f.write(f"{a} + {b} = {a + b}")
    return a + b
from django_hookflow import dispatch_workflow

dispatch_workflow(repo="user/repo", workflow_file="workflow.yml")