Skip to content

Initial durable GitHub Mastra workflow #1

Initial durable GitHub Mastra workflow

Initial durable GitHub Mastra workflow #1

Workflow file for this run

name: Send event to local Mastra loop
on:
issues:
types: [opened, edited, labeled, reopened]
issue_comment:
types: [created]
pull_request:
types: [opened, synchronize, reopened]
push:
jobs:
enqueue:
# Install a GitHub self-hosted runner on the machine that runs Mastra and
# give it the custom label "local-llm".
runs-on: [self-hosted, local-llm]
timeout-minutes: 2
steps:
- name: Deliver event to the durable local inbox
env:
DELIVERY_ID: ${{ github.run_id }}-${{ github.run_attempt }}
EVENT_NAME: ${{ github.event_name }}
EVENT_PATH: ${{ github.event_path }}
run: |
curl --fail-with-body --retry 3 \
-X POST http://127.0.0.1:4317/webhooks/github \
-H "content-type: application/json" \
-H "x-github-delivery: ${DELIVERY_ID}" \
-H "x-github-event: ${EVENT_NAME}" \
--data-binary "@${EVENT_PATH}"