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:
parent
d4b4bdfa12
commit
2aa7277f2f
|
|
@ -6,6 +6,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
trigger-review:
|
trigger-review:
|
||||||
|
if: false # disabled – workflow disabled for fork
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pull_request:
|
pull_request:
|
||||||
if: github.event_name == 'pull_request'
|
if: false # disabled – workflow disabled for fork
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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 @-
|
jq -n --arg content "$MSG" '{content: $content}' | curl -sf --retry 2 -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @-
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
if: github.event_name == 'issues'
|
if: false # disabled – workflow disabled for fork
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ concurrency:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
if: false # disabled – workflow disabled for fork
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ name: Quality & Validation
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prettier:
|
prettier:
|
||||||
|
if: false # disabled – workflow disabled for fork
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -34,6 +35,7 @@ jobs:
|
||||||
run: npm run format:check
|
run: npm run format:check
|
||||||
|
|
||||||
eslint:
|
eslint:
|
||||||
|
if: false # disabled – workflow disabled for fork
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -52,6 +54,7 @@ jobs:
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
markdownlint:
|
markdownlint:
|
||||||
|
if: false # disabled – workflow disabled for fork
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -70,6 +73,7 @@ jobs:
|
||||||
run: npm run lint:md
|
run: npm run lint:md
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
|
if: false # disabled – workflow disabled for fork
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -89,6 +93,7 @@ jobs:
|
||||||
run: npm run docs:build
|
run: npm run docs:build
|
||||||
|
|
||||||
validate:
|
validate:
|
||||||
|
if: false # disabled – workflow disabled for fork
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
[upstream]: https://github.com/bmad-code-org/BMAD-METHOD
|
||||||
Loading…
Reference in New Issue