pnpm workspace root for Barazo forum development — shared configuration, tooling, and cross-package dependency management
barazo.forum
1name: Sync AGENTS.md
2
3on:
4 push:
5 branches: [main]
6 paths:
7 - 'agents-md/**'
8 schedule:
9 - cron: '0 6 * * 1' # Weekly Monday 6am UTC
10 workflow_dispatch: {}
11
12jobs:
13 sync:
14 runs-on: ubuntu-latest
15 strategy:
16 fail-fast: false
17 matrix:
18 repo:
19 - barazo-api
20 - barazo-web
21 - barazo-lexicons
22 - barazo-deploy
23 - barazo-website
24 - barazo-docs
25 steps:
26 - name: Checkout barazo-workspace
27 uses: actions/checkout@v4
28
29 - name: Build AGENTS.md
30 run: ./agents-md/build.sh
31
32 - name: Checkout target repo
33 uses: actions/checkout@v4
34 with:
35 repository: singi-labs/${{ matrix.repo }}
36 token: ${{ secrets.SYNC_TOKEN }}
37 path: target-repo
38
39 - name: Check for changes
40 id: diff
41 run: |
42 if diff -q agents-md/dist/${{ matrix.repo }}.md target-repo/AGENTS.md 2>/dev/null; then
43 echo "changed=false" >> "$GITHUB_OUTPUT"
44 else
45 echo "changed=true" >> "$GITHUB_OUTPUT"
46 fi
47
48 - name: Create PR with updated AGENTS.md
49 if: steps.diff.outputs.changed == 'true'
50 env:
51 GH_TOKEN: ${{ secrets.SYNC_TOKEN }}
52 run: |
53 cd target-repo
54 BRANCH="chore/sync-agents-md-$(date +%Y%m%d-%H%M)"
55
56 git config user.name "github-actions[bot]"
57 git config user.email "github-actions[bot]@users.noreply.github.com"
58
59 git checkout -b "$BRANCH"
60 cp ../agents-md/dist/${{ matrix.repo }}.md AGENTS.md
61 git add AGENTS.md
62 git commit -m "docs: sync AGENTS.md from barazo-workspace"
63
64 git push -u origin "$BRANCH"
65 PR_URL=$(gh pr create \
66 --title "docs: sync AGENTS.md from barazo-workspace" \
67 --body "Auto-generated from [barazo-workspace/agents-md](https://github.com/singi-labs/barazo-workspace/tree/main/agents-md). Do not edit AGENTS.md directly in this repo." \
68 --head "$BRANCH" \
69 --base main)
70
71 # Auto-merge if enabled; log warning if not available
72 gh pr merge "$PR_URL" --squash --auto || echo "::warning::Auto-merge not available for ${{ matrix.repo }}. PR created for manual merge."