feat: add upstream sync action and disable existing workflows

Disable all existing GitHub Actions workflows (CodeRabbit, Discord,
docs deploy, quality checks) for this fork by adding `if: false` to
each job. Add new upstream-sync workflow that automatically syncs from
bmad-code-org/BMAD-METHOD every 6 hours via schedule and on manual
dispatch. Creates an issue on sync failure with remediation steps.

https://claude.ai/code/session_01Mxvkj6F7iEbx5sG2jnH4Sm
This commit is contained in:
Claude 2026-02-16 14:24:20 +00:00
parent d4b4bdfa12
commit 2aa7277f2f
No known key found for this signature in database
5 changed files with 63 additions and 2 deletions

View File

@ -6,6 +6,7 @@ on:
jobs:
trigger-review:
if: false # disabled workflow disabled for fork
runs-on: ubuntu-latest
permissions:
pull-requests: write

View File

@ -12,7 +12,7 @@ env:
jobs:
pull_request:
if: github.event_name == 'pull_request'
if: false # disabled workflow disabled for fork
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -54,7 +54,7 @@ jobs:
jq -n --arg content "$MSG" '{content: $content}' | curl -sf --retry 2 -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @-
issues:
if: github.event_name == 'issues'
if: false # disabled workflow disabled for fork
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

View File

@ -23,6 +23,7 @@ concurrency:
jobs:
build:
if: false # disabled workflow disabled for fork
runs-on: ubuntu-latest
steps:
- name: Checkout repository

View File

@ -16,6 +16,7 @@ name: Quality & Validation
jobs:
prettier:
if: false # disabled workflow disabled for fork
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -34,6 +35,7 @@ jobs:
run: npm run format:check
eslint:
if: false # disabled workflow disabled for fork
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -52,6 +54,7 @@ jobs:
run: npm run lint
markdownlint:
if: false # disabled workflow disabled for fork
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -70,6 +73,7 @@ jobs:
run: npm run lint:md
docs:
if: false # disabled workflow disabled for fork
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -89,6 +93,7 @@ jobs:
run: npm run docs:build
validate:
if: false # disabled workflow disabled for fork
runs-on: ubuntu-latest
steps:
- name: Checkout

54
.github/workflows/upstream-sync.yaml vendored Normal file
View File

@ -0,0 +1,54 @@
name: Upstream Sync
permissions:
contents: write
issues: write
actions: write
on:
schedule:
- cron: '0 */6 * * *' # every 6 hours
workflow_dispatch:
jobs:
sync_latest_from_upstream:
name: Sync latest commits from upstream repo
runs-on: ubuntu-latest
if: ${{ github.event.repository.fork }}
steps:
- uses: actions/checkout@v6
- name: Clean issue notice
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issues'
labels: '🚨 Sync Fail'
- name: Sync upstream changes
id: sync
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4
with:
upstream_sync_repo: bmad-code-org/BMAD-METHOD
upstream_sync_branch: main
target_sync_branch: main
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
test_mode: false
- name: Sync check
if: failure()
uses: actions-cool/issues-helper@v3
with:
actions: 'create-issue'
title: '🚨 Upstream Sync Failed'
labels: '🚨 Sync Fail'
body: |
Due to a change in the workflow file of the [BMAD-METHOD][upstream] upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork.
### How to fix
1. Go to your fork on GitHub
2. Click **Sync fork** → **Update branch**
3. If there are conflicts, clone locally and resolve them
![Sync fork button](https://docs.github.com/assets/cb-49937/mw-1440/images/help/repository/sync-fork-dropdown.webp)
[upstream]: https://github.com/bmad-code-org/BMAD-METHOD