Skip to content

This Github Action Integrations allows you to fetch certain file types from your repository and send them as request to Lamatic.ai

License

Notifications You must be signed in to change notification settings

Lamatic/Index-to-lamatic

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webhook Action Lamatic Index Flow

This GitHub Action detects changes to specified file types in your repository and sends the file content to a webhook. It’s ideal for scenarios where you need to synchronize or process modified files with an external service.

📌 Features

  • File Change Detection: Monitors specific file types (e.g., .mdx, .json) and detects newly added or modified files.
  • Webhook Integration: Sends file content to a specified webhook URL with an authorization key.
  • Configurable: Easily specify the file type you want to track.

🚀 Usage

Prerequisites

  1. Webhook URL and Webhook Key: Obtain the webhook URL from lamatic Flow, read this doc on how to build a flow with webhooks as a trigger or use this template .
  2. GitHub Secrets: Store sensitive data such as WEBHOOK_URL and WEBHOOK_KEY in your repository secrets.

Workflow Example

To use this action, add the following YAML to a GitHub Actions workflow file, such as .github/workflows/lamatic-index-flow.yml:

name: Lamatic Index Flow

on:
  push:
    branches:
      - main  # Replace with your branch if necessary
    paths: 
      - '**.mdx'  # Adjust to only trigger for changes to specific file types

jobs:
  send-changes:
    runs-on: ubuntu-latest
    
    steps:
    - name: Send File Changes to Webhook
      uses: Lamatic/[email protected]  # Uses action
      with:
        webhook_url: ${{ secrets.WEBHOOK_URL }}  # Replace with your secret
        webhook_key: ${{ secrets.WEBHOOK_KEY }}   # Replace with your secret
        github_ref: ${{ github.ref }}
        file_type: "mdx"  # Adjust the file type as needed
        mode: "incremental"  # or "full-refresh"
        verbose: "true"  # or "false"

Inputs

Input Description Required Example
webhook_url The URL of the webhook to send data to Yes https://example.com/webhook
webhook_key The authorization key for the webhook Yes your_webhook_key
github_ref The GitHub reference (branch) to work with Yes refs/heads/main
file_type The file extension to detect and send (e.g., mdx) Yes mdx
mode The mode to operate in: full-refresh to send all files, or incremental to send only new/modified from the last commit. Yes incremental or full-refresh
verbose Enable verbose output (true or false). Default - False No True

Example Scenarios

  • Monitor Markdown Files: Set file_type: "mdx" to monitor changes in markdown files and send updates to a content management system.
  • Sync JSON Configurations: Set file_type: "json" to detect and sync JSON configuration changes with an external service.

Versioning

To use a specific version, reference it in your workflow like so:

- uses: Lamatic/[email protected]

Changelog

v1.6.0

  • Initial release of Webhook Action Lamatic Index Flow.
  • Supports monitoring and sending changes for specified file types.
  • Integration with webhooks using URL and authorization key.

This Action introduces the core functionality of monitoring file changes and sending them to a webhook, making it ideal for keeping external services up to date with file modifications in your GitHub repository.

About

This Github Action Integrations allows you to fetch certain file types from your repository and send them as request to Lamatic.ai

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages