-
Notifications
You must be signed in to change notification settings - Fork 0
chore: sync 80 BlackRoad OS workflows #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
blackboxprogramming
wants to merge
80
commits into
main
Choose a base branch
from
chore/sync-workflows
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
80b0407
chore: sync workflow agent-broadcast.yml
blackboxprogramming fd96fc4
chore: sync workflow agent-ci.yml
blackboxprogramming 28b9f7a
chore: sync workflow agent-deploy.yml
blackboxprogramming 7d4b324
chore: sync workflow agent-health-check.yml
blackboxprogramming e3b3e85
chore: sync workflow agent-identity-on-pr.yml
blackboxprogramming 5789375
chore: sync workflow agent-identity-sync.yml
blackboxprogramming b8d8ed8
chore: sync workflow agent-memory-sync.yml
blackboxprogramming e57f08b
chore: sync workflow auto-label.yml
blackboxprogramming cb4cbef
chore: sync workflow auto-merge.yml
blackboxprogramming 32a53c9
chore: sync workflow autonomous-cross-repo.yml
blackboxprogramming ce70e02
chore: sync workflow autonomous-dependency-manager.yml
blackboxprogramming af4a456
chore: sync workflow autonomous-issue-manager.yml
blackboxprogramming 0f2aa25
chore: sync workflow autonomous-orchestrator.yml
blackboxprogramming c121406
chore: sync workflow autonomous-self-healer.yml
blackboxprogramming b50241b
chore: sync workflow backup.yml
blackboxprogramming 25622a1
chore: sync workflow branch-agent-identity.yml
blackboxprogramming b8367ff
chore: sync workflow branch-protection.yml
blackboxprogramming 2e89290
chore: sync workflow cf-dns-setup.yml
blackboxprogramming 2f725e8
chore: sync workflow check-dependencies.yml
blackboxprogramming ec8ce8f
chore: sync workflow ci.yml
blackboxprogramming e4ef14e
chore: sync workflow cloudflare-dns-pi.yml
blackboxprogramming 29215b0
chore: sync workflow cloudflare-pi-deploy.yml
blackboxprogramming 670afc8
chore: sync workflow code-review-assign.yml
blackboxprogramming f41e7a9
chore: sync workflow configure-pi-nginx.yml
blackboxprogramming 940170a
chore: sync workflow continuous-engine.yml
blackboxprogramming 89fc11b
chore: sync workflow continuous-loop.yml
blackboxprogramming 520e9b9
chore: sync workflow core-ci.yml
blackboxprogramming b81c191
chore: sync workflow cross-org-cohesion.yml
blackboxprogramming 363f958
chore: sync workflow cross-repo-sync.yml
blackboxprogramming 279c2c1
chore: sync workflow deploy-5-blackroad-workers.yml
blackboxprogramming 6264f1b
chore: sync workflow deploy-cloudflare-workers.yml
blackboxprogramming e42fd37
chore: sync workflow deploy-everything.yml
blackboxprogramming efe29ca
chore: sync workflow docker-build.yml
blackboxprogramming 7ef60a6
chore: sync workflow docs-deploy.yml
blackboxprogramming 669da25
chore: sync workflow domain-health.yml
blackboxprogramming 188f97a
chore: sync workflow failure-issue.yml
blackboxprogramming 00c0ba6
chore: sync workflow fleet-status.yml
blackboxprogramming f12af10
chore: sync workflow gdrive-backup.yml
blackboxprogramming e5c6a9c
chore: sync workflow google-drive-sync.yml
blackboxprogramming e5e748e
chore: sync workflow hf-model-registry.yml
blackboxprogramming b1fa5d1
chore: sync workflow huggingface-model-sync.yml
blackboxprogramming 33f3e49
chore: sync workflow huggingface-ollama-sync.yml
blackboxprogramming 59dc428
chore: sync workflow huggingface-sync.yml
blackboxprogramming 7cb1726
chore: sync workflow multi-cloud-backup.yml
blackboxprogramming ef1f023
chore: sync workflow nginx-docker.yml
blackboxprogramming 4ea07ed
chore: sync workflow nginx-oneshot.yml
blackboxprogramming 203fd2a
chore: sync workflow npm-publish.yml
blackboxprogramming e1b1667
chore: sync workflow org-cohesion-sync.yml
blackboxprogramming a328ffe
chore: sync workflow pi-agent-tasks.yml
blackboxprogramming 4cc7a24
chore: sync workflow pi-domain-router.yml
blackboxprogramming 5c833a8
chore: sync workflow pi-domains-setup.yml
blackboxprogramming 54c35b3
chore: sync workflow pi-failover-healthcheck.yml
blackboxprogramming c37ee6a
chore: sync workflow pi-fleet-heartbeat.yml
blackboxprogramming 4d99dd9
chore: sync workflow pi-nginx-setup.yml
blackboxprogramming 2272b42
chore: sync workflow pi-runner-setup.yml
blackboxprogramming 1615851
chore: sync workflow pi-self-hosted-setup.yml
blackboxprogramming 040c573
chore: sync workflow platform-auth-check.yml
blackboxprogramming 1ae173d
chore: sync workflow platform-integrations.yml
blackboxprogramming 2a5dddd
chore: sync workflow pr-auto-label.yml
blackboxprogramming 1be6d95
chore: sync workflow project-sync.yml
blackboxprogramming acdbdad
chore: sync workflow railway-continuous.yml
blackboxprogramming 8de9196
chore: sync workflow railway-deploy.yml
blackboxprogramming e41efdc
chore: sync workflow railway-env-sync.yml
blackboxprogramming 86d3bf7
chore: sync workflow railway-pi-deploy.yml
blackboxprogramming 3624f43
chore: sync workflow release.yml
blackboxprogramming 270bc68
chore: sync workflow salesforce-cicd.yml
blackboxprogramming c921a51
chore: sync workflow salesforce-full-deploy.yml
blackboxprogramming 4ed85e8
chore: sync workflow salesforce-pi-sync.yml
blackboxprogramming 66be3c4
chore: sync workflow security-scan.yml
blackboxprogramming 7fd76dc
chore: sync workflow semantic-release.yml
blackboxprogramming de45835
chore: sync workflow sf-auth-setup.yml
blackboxprogramming 5154429
chore: sync workflow sf-metadata-backup.yml
blackboxprogramming 2cc7a29
chore: sync workflow stale.yml
blackboxprogramming 52d069b
chore: sync workflow status-page.yml
blackboxprogramming afb9e3a
chore: sync workflow tunnel-watchdog.yml
blackboxprogramming ce17daa
chore: sync workflow version-bump.yml
blackboxprogramming cb77560
chore: sync workflow watchdog.yml
blackboxprogramming 031da5c
chore: sync workflow workflow-index-sync.yml
blackboxprogramming 4e74bc4
chore: sync workflow wrangler-deploy.yml
blackboxprogramming 6a7f8f0
chore: sync workflow zero-cost-dashboard.yml
blackboxprogramming File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| name: 📡 Agent Broadcast via NATS | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| subject: | ||
| description: 'NATS subject (e.g. blackroad.agents.all)' | ||
| required: false | ||
| default: 'blackroad.agents.all' | ||
| message: | ||
| description: 'Message to broadcast' | ||
| required: true | ||
| schedule: | ||
| - cron: '*/30 * * * *' # Every 30 min heartbeat | ||
|
|
||
| jobs: | ||
| broadcast: | ||
| name: 📡 Broadcast to Fleet | ||
| runs-on: [self-hosted, blackroad-fleet] | ||
| steps: | ||
| - name: Send NATS heartbeat | ||
| run: | | ||
| SUBJECT="${{ github.event.inputs.subject || 'blackroad.heartbeat' }}" | ||
| MSG="${{ github.event.inputs.message || 'heartbeat' }}" | ||
| TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ) | ||
|
|
||
| # Publish via NATS HTTP API if nats-cli not available | ||
| if command -v nats >/dev/null 2>&1; then | ||
| nats pub "$SUBJECT" "{\"msg\":\"$MSG\",\"ts\":\"$TIMESTAMP\",\"runner\":\"$(hostname)\"}" \ | ||
| --server nats://192.168.4.38:4222 | ||
| else | ||
| curl -s "http://192.168.4.38:8222/routez" > /dev/null && \ | ||
| echo "📡 NATS online - heartbeat registered" | ||
| fi | ||
|
|
||
| echo "📡 Broadcast: $SUBJECT → $MSG @ $TIMESTAMP" | ||
|
|
||
| - name: Update fleet status | ||
| run: | | ||
| # Write fleet heartbeat to memory | ||
| echo "{\"heartbeat\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"runner\":\"$(hostname)\",\"status\":\"online\"}" \ | ||
| > /tmp/fleet-heartbeat.json | ||
| echo "✅ Fleet heartbeat recorded" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Agent Deploy | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - 'tools/**' | ||
| - 'agents/**' | ||
| - 'blackroad-sf/**' | ||
| workflow_dispatch: | ||
| inputs: | ||
| target: | ||
| description: 'Deploy target (worker/sf/pi)' | ||
| required: true | ||
| default: 'worker' | ||
| jobs: | ||
| deploy: | ||
| runs-on: [self-hosted, blackroad-fleet] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: false | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| - name: Log deploy event | ||
| run: | | ||
| echo "{\"ts\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"action\":\"deploy\",\"entity\":\"${{ github.ref_name }}\",\"detail\":\"Triggered by push to ${{ github.ref_name }}\"}" >> memory/journals/master-journal.jsonl || true | ||
| echo "Deploy triggered for: ${{ github.event.inputs.target || 'auto' }}" | ||
| echo "Branch: ${{ github.ref_name }}" | ||
| echo "Commit: ${{ github.sha }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: Agent Health Check | ||
| on: | ||
| schedule: | ||
| - cron: '0 */6 * * *' # Every 6 hours | ||
| workflow_dispatch: | ||
| jobs: | ||
| health-check: | ||
| runs-on: [self-hosted, blackroad-fleet] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: false | ||
| - name: Check Pi tunnel | ||
| run: | | ||
| STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://api.blackroad.io/health 2>/dev/null || echo "000") | ||
| echo "API health: $STATUS" | ||
| if [ "$STATUS" != "200" ]; then | ||
| echo "::warning::API health check returned $STATUS" | ||
| fi | ||
| - name: Check Cloudflare Worker | ||
| run: | | ||
| STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://blackroad.io 2>/dev/null || echo "000") | ||
| echo "Main site: $STATUS" | ||
| - name: Memory journal entry | ||
| run: | | ||
| echo "{\"ts\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"action\":\"health-check\",\"entity\":\"github-actions\",\"detail\":\"Scheduled health check completed\"}" >> memory/journals/master-journal.jsonl || true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| name: "🤖 PR Agent Identity" | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize] | ||
| pull_request_target: | ||
| types: [opened] | ||
|
|
||
| jobs: | ||
| create-pr-identity: | ||
| runs-on: [self-hosted, blackroad-fleet] | ||
| permissions: | ||
| pull-requests: write | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: false | ||
| - name: Create PR agent identity | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| PR_NUM="${{ github.event.pull_request.number }}" | ||
| PR_BRANCH="${{ github.event.pull_request.head.ref }}" | ||
| PR_AUTHOR="${{ github.event.pull_request.user.login }}" | ||
| PR_TITLE="${{ github.event.pull_request.title }}" | ||
|
|
||
| # Detect agent role from branch name | ||
| ROLE="general" | ||
| echo "$PR_BRANCH" | grep -qi "feat\|feature" && ROLE="feature-builder" | ||
| echo "$PR_BRANCH" | grep -qi "fix\|bug\|patch" && ROLE="bug-fixer" | ||
| echo "$PR_BRANCH" | grep -qi "refactor" && ROLE="code-optimizer" | ||
| echo "$PR_BRANCH" | grep -qi "docs\|doc" && ROLE="documentation" | ||
| echo "$PR_BRANCH" | grep -qi "ci\|cd\|workflow" && ROLE="devops" | ||
| echo "$PR_BRANCH" | grep -qi "security\|sec\|auth" && ROLE="security" | ||
| echo "$PR_BRANCH" | grep -qi "test\|spec" && ROLE="test-engineer" | ||
| echo "$PR_BRANCH" | grep -qi "release\|v[0-9]" && ROLE="release-manager" | ||
|
|
||
| # Post agent identity comment | ||
| gh pr comment $PR_NUM --body " | ||
| ## 🤖 Agent Identity Activated | ||
|
|
||
| | Field | Value | | ||
| |-------|-------| | ||
| | **Agent** | \`PR-$PR_NUM-${PR_BRANCH}\` | | ||
| | **Role** | $ROLE | | ||
| | **Author** | @$PR_AUTHOR | | ||
| | **Gateway** | https://agents.blackroad.io | | ||
| | **Runner** | [self-hosted, pi, blackroad] | | ||
| | **Qdrant** | 192.168.4.49:6333 | | ||
|
|
||
| > This PR has an assigned BlackRoad agent identity. Merging will update the agent registry. | ||
| " 2>/dev/null || true | ||
|
|
||
| echo "✅ PR #$PR_NUM agent identity: $ROLE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: Agent Identity Sync | ||
| on: | ||
| push: | ||
| branches: ['**'] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| assign-identity: | ||
| runs-on: [self-hosted, blackroad-fleet] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: false | ||
| fetch-depth: 1 | ||
| - name: Assign Agent Identity to Branch | ||
| run: | | ||
| BRANCH="${{ github.ref_name }}" | ||
| REPO="${{ github.repository }}" | ||
| ORG="${{ github.repository_owner }}" | ||
|
|
||
| # Determine agent from branch prefix | ||
| case "$BRANCH" in | ||
| main|master) AGENT="CECE" ;; | ||
| feat/sf-*|feat/salesforce-*) AGENT="ALICE" ;; | ||
| feat/infra-*|feat/deploy-*|feat/ci-*|release/*) AGENT="OCTAVIA" ;; | ||
| feat/ai-*|feat/model-*|feat/ml-*|codex/*) AGENT="LUCIDIA" ;; | ||
| feat/sec-*|feat/security-*|feat/vault-*) AGENT="CIPHER" ;; | ||
| feat/ui-*|feat/frontend-*|feat/ux-*) AGENT="ARIA" ;; | ||
| feat/data-*|feat/analytics-*) AGENT="PRISM" ;; | ||
| feat/mem-*|feat/memory-*) AGENT="ECHO" ;; | ||
| feat/hack-*|feat/research-*) AGENT="SHELLFISH" ;; | ||
| hotfix/*|fix/*|chore/*) AGENT="ALICE" ;; | ||
| bot/*|claude/*|copilot/*) AGENT="CECE" ;; | ||
| *) AGENT="CECE" ;; | ||
| esac | ||
|
|
||
| # Determine agent from org | ||
| case "$ORG" in | ||
| BlackRoad-AI) ORG_AGENT="LUCIDIA" ;; | ||
| BlackRoad-Security) ORG_AGENT="CIPHER" ;; | ||
| BlackRoad-Cloud|BlackRoad-Hardware) ORG_AGENT="OCTAVIA" ;; | ||
| BlackRoad-Media|BlackRoad-Interactive|BlackRoad-Studio) ORG_AGENT="ARIA" ;; | ||
| BlackRoad-Labs) ORG_AGENT="PRISM" ;; | ||
| BlackRoad-Education) ORG_AGENT="ECHO" ;; | ||
| Blackbox-Enterprises) ORG_AGENT="ALICE" ;; | ||
| BlackRoad-Gov|BlackRoad-Security) ORG_AGENT="CIPHER" ;; | ||
| *) ORG_AGENT="$AGENT" ;; | ||
| esac | ||
|
|
||
| echo "🤖 Branch Agent: $AGENT" | ||
| echo "🏢 Org Agent: $ORG_AGENT" | ||
| echo "🌿 Branch: $BRANCH" | ||
| echo "📦 Repo: $REPO" | ||
|
|
||
| # Write identity file | ||
| printf '{\n "branch": "%s",\n "agent": "%s",\n "org_agent": "%s",\n "repo": "%s",\n "org": "%s",\n "assigned_at": "%s",\n "gateway": "http://192.168.4.38:4010",\n "model": "qwen2.5:3b",\n "cost": "$0"\n}\n' \ | ||
| "$BRANCH" "$AGENT" "$ORG_AGENT" "$REPO" "$ORG" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \ | ||
| > .agent-identity.json | ||
| echo "✅ Identity written to .agent-identity.json" | ||
| cat .agent-identity.json | ||
|
|
||
| - name: Post Identity to Agent Bridge | ||
| continue-on-error: true | ||
| run: | | ||
| AGENT=$(cat .agent-identity.json | python3 -c "import sys,json; print(json.load(sys.stdin)['agent'])") | ||
| curl -s -X POST http://192.168.4.38:4010/identity \ | ||
| -H "Content-Type: application/json" \ | ||
| -d @.agent-identity.json \ | ||
| --connect-timeout 5 || echo "Bridge offline - identity stored locally" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| name: Agent Memory Sync | ||
| on: | ||
| schedule: | ||
| - cron: '0 */6 * * *' # every 6 hours | ||
| push: | ||
| branches: [master, main] | ||
| paths: | ||
| - 'memory/**' | ||
| - 'agents/identities/**' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| sync-memory: | ||
| runs-on: [self-hosted, blackroad-fleet] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| with: | ||
| submodules: false | ||
| - name: Sync memory journals to Pi fleet | ||
| run: | | ||
| echo "=== Syncing memory to Pi fleet ===" | ||
| PIES=(cecilia octavia aria alice) | ||
| for pi in "${PIES[@]}"; do | ||
| echo "→ Syncing to $pi..." | ||
| # Sync memory directory | ||
| rsync -az --timeout=10 \ | ||
| memory/ "$pi":~/blackroad/memory/ 2>/dev/null && \ | ||
| echo " ✅ memory synced" || echo " ⚠️ sync failed" | ||
| # Sync agent identities | ||
| rsync -az --timeout=10 \ | ||
| agents/identities/ "$pi":~/blackroad/agents/identities/ 2>/dev/null && \ | ||
| echo " ✅ identities synced" || echo " ⚠️ identities sync failed" | ||
| done | ||
|
|
||
| - name: Pull memory updates from fleet | ||
| run: | | ||
| echo "=== Collecting memory updates ===" | ||
| for pi in cecilia octavia aria alice; do | ||
| # Pull any new journal entries from Pi | ||
| ssh -o ConnectTimeout=5 -o BatchMode=yes "$pi" \ | ||
| "cat ~/blackroad/memory/journals/master-journal.jsonl 2>/dev/null | tail -20" 2>/dev/null | \ | ||
| while read -r line; do | ||
| HASH=$(echo "$line" | python3 -c "import sys,json,hashlib; d=json.loads(sys.stdin.read()); print(d.get('hash','')[:12])" 2>/dev/null) | ||
| # Only append if not already in local journal | ||
| if [ -n "$HASH" ] && ! grep -q "$HASH" memory/journals/master-journal.jsonl 2>/dev/null; then | ||
| echo "$line" >> memory/journals/master-journal.jsonl | ||
| fi | ||
| done || true | ||
| done | ||
| echo "✅ Memory sync complete" | ||
|
|
||
| - name: Update session state | ||
| run: | | ||
| python3 - <<'EOF' | ||
| import json, os, hashlib, datetime | ||
|
|
||
| state_file = "memory/sessions/current-session.json" | ||
| try: | ||
| with open(state_file) as f: | ||
| state = json.load(f) | ||
| except: | ||
| state = {} | ||
|
|
||
| state["last_memory_sync"] = datetime.datetime.utcnow().isoformat() + "Z" | ||
| state["sync_count"] = state.get("sync_count", 0) + 1 | ||
|
|
||
| with open(state_file, "w") as f: | ||
| json.dump(state, f, indent=2) | ||
| print(f"✅ Session state updated (sync #{state['sync_count']})") | ||
| EOF | ||
|
|
||
| - name: Commit memory updates | ||
| run: | | ||
| git config user.name "blackroad-bot" | ||
| git config user.email "blackroad.systems@gmail.com" | ||
| git add memory/ agents/identities/ | ||
| git diff --staged --quiet && echo "No changes to commit" || \ | ||
| git commit -m "chore: agent memory sync [skip ci] [skip release] [skip-bump]" && \ | ||
| git push origin master | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| name: Auto Merge | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, labeled] | ||
| pull_request_review: | ||
| types: [submitted] | ||
| check_suite: | ||
| types: [completed] | ||
|
|
||
| jobs: | ||
| auto-merge: | ||
| runs-on: [self-hosted, blackroad-fleet] | ||
| if: | | ||
| github.actor == 'dependabot[bot]' || | ||
| github.actor == 'blackroad-bot' || | ||
| contains(github.event.pull_request.labels.*.name, 'auto-merge') | ||
| steps: | ||
| - name: Auto approve + merge | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| const pr = context.payload.pull_request || context.payload.review?.pull_request; | ||
| if (!pr) return; | ||
| // Approve | ||
| await github.rest.pulls.createReview({ | ||
| owner: context.repo.owner, repo: context.repo.repo, | ||
| pull_number: pr.number, event: 'APPROVE', | ||
| body: '✅ Auto-approved by blackroad bot' | ||
| }).catch(() => {}); | ||
| // Merge | ||
| await github.rest.pulls.merge({ | ||
| owner: context.repo.owner, repo: context.repo.repo, | ||
| pull_number: pr.number, merge_method: 'squash' | ||
| }); | ||
| console.log(`✅ Auto-merged PR #${pr.number}`); | ||
|
|
||
| auto-merge-bot-branches: | ||
| runs-on: [self-hosted, blackroad-fleet] | ||
| if: | | ||
| startsWith(github.head_ref, 'bot/') || | ||
| startsWith(github.head_ref, 'copilot/') | ||
| steps: | ||
| - name: Merge bot branches | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| const pr = context.payload.pull_request; | ||
| if (!pr) return; | ||
| await github.rest.pulls.merge({ | ||
| owner: context.repo.owner, repo: context.repo.repo, | ||
| pull_number: pr.number, merge_method: 'squash', | ||
| commit_title: `🤖 Auto-merge ${pr.title}` | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate
with:block detected causing invalid YAML syntax.