forked from runxhq/runx
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (71 loc) · 2.72 KB
/
Copy pathfrantic-github-thread-sync.yml
File metadata and controls
81 lines (71 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: frantic-github-thread-sync
# Frantic tenant configuration for the generic runx thread-reconcile engine. The
# engine (scripts/thread-reconcile-sync.mjs) is domain-agnostic; everything
# Frantic-specific lives here as env/secrets. It pulls Frantic's desired board
# thread state and reconciles the mirror repo to match. The reconcile is
# stateless and idempotent, so there is no cursor to persist: every run compares
# desired vs live and applies only the difference, and drift self-heals.
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
on:
# The venue fires repository_dispatch (board-sync) on board activity so the
# reconcile runs promptly. The cron is the backstop: GitHub throttles
# high-frequency schedules under load, so the dispatch is what keeps the mirror
# low-latency rather than schedule-only.
repository_dispatch:
types: [board-sync]
workflow_dispatch:
inputs:
dry_run:
description: "Reconcile in dry-run: fetch desired state and report planned actions without writing"
required: false
default: "false"
type: choice
options:
- "false"
- "true"
limit:
description: "Maximum threads to reconcile per run"
required: false
default: "50"
type: string
schedule:
- cron: "1-59/5 * * * *"
permissions:
contents: read
concurrency:
group: frantic-github-thread-sync
cancel-in-progress: false
jobs:
sync:
runs-on: ubuntu-latest
env:
THREAD_SYNC_API_BASE_URL: ${{ vars.FRANTIC_API_BASE_URL || 'https://api.gofrantic.com' }}
THREAD_SYNC_TARGET_REPO: ${{ vars.FRANTIC_GITHUB_TARGET_REPO || 'auscaster/frantic-board' }}
THREAD_SYNC_SOURCE_ID: frantic
THREAD_SYNC_LIMIT: ${{ inputs.limit || '50' }}
THREAD_SYNC_DRY_RUN: ${{ inputs.dry_run || 'false' }}
THREAD_SYNC_INTERNAL_SECRET: ${{ secrets.FRANTIC_INTERNAL_SYNC_SECRET }}
GH_TOKEN: ${{ secrets.FRANTIC_BOARD_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FRANTIC_BOARD_GITHUB_TOKEN }}
GH_PROMPT_DISABLED: "1"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v5
with:
version: 10.18.2
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Reconcile Frantic board threads
shell: bash
run: |
set -euo pipefail
[[ -n "${THREAD_SYNC_INTERNAL_SECRET}" ]] || { echo "FRANTIC_INTERNAL_SYNC_SECRET is required"; exit 1; }
[[ -n "${GH_TOKEN}" ]] || { echo "FRANTIC_BOARD_GITHUB_TOKEN is required"; exit 1; }
pnpm --silent thread:reconcile-sync