Create Bustfile #93
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
| # SPDX-License-Identifier: PMPL-1.0-or-later | ||
| # | ||
| # OPTIONAL: BoJ Server Build Trigger | ||
| # This workflow notifies a BoJ Server instance when code is pushed. | ||
| # It is a no-op if BOJ_SERVER_URL is not set or the server is unreachable. | ||
| # To enable: set BOJ_SERVER_URL as a repository secret or variable. | ||
| # To disable: delete this file or leave BOJ_SERVER_URL unset. | ||
| name: BoJ Server Build Trigger | ||
| on: | ||
| push: | ||
| branches: [main, master] | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| trigger-boj: | ||
| runs-on: ubuntu-latest | ||
| if: ${{ vars.BOJ_SERVER_URL != '' || secrets.BOJ_SERVER_URL != '' }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - name: Trigger BoJ Server (Casket/ssg-mcp) | ||
| env: | ||
| BOJ_URL: ${{ secrets.BOJ_SERVER_URL || vars.BOJ_SERVER_URL }} | ||
| REPO_NAME: ${{ github.repository }} | ||
| BRANCH_NAME: ${{ github.ref_name }} | ||
| run: | | ||
| set -euo pipefail | ||
| if [ -z "$BOJ_URL" ]; then | ||
| echo "BOJ_SERVER_URL not configured - skipping" | ||
| exit 0 | ||
| fi | ||
| payload="$(jq -cn \ | ||
| --arg repo "$REPO_NAME" \ | ||
| --arg branch "$BRANCH_NAME" \ | ||
| --arg engine "casket" \ | ||
| '{repo:$repo, branch:$branch, engine:$engine}')" | ||
| curl -sf -X POST "${BOJ_URL}/cartridges/ssg-mcp/invoke" \ | ||
| -H "Content-Type: application/json" \ | ||
| --data "$payload" \ | ||
| || echo "BoJ server unreachable - skipping (non-fatal)" | ||
| - name: K9-SVC Validation | ||
| run: | | ||
| echo "Running K9-SVC contractile validation..." | ||
| if [ -f .machine_readable/contractiles/must/Mustfile.a2ml ]; then | ||
| echo "✅ Mustfile found - running validation" | ||
| # Placeholder for actual K9 validation | ||
| echo "K9 validation would run here" | ||
| else | ||
| echo "❌ Mustfile not found" | ||
| exit 1 | ||
| fi | ||
| - name: Contractile Check | ||
| run: | | ||
| echo "Checking contractile completeness..." | ||
| contractiles=("must" "trust" "dust" "lust" "adjust" "intend") | ||
| missing=0 | ||
| for c in "${contractiles[@]}"; do | ||
| if [ ! -f ".machine_readable/contractiles/$c/${c^}file.a2ml" ]; then | ||
| echo "❌ Missing: $c" | ||
| missing=$((missing + 1)) | ||
| fi | ||
| done | ||
| if [ $missing -gt 0 ]; then | ||
| echo "❌ $missing contractiles missing" | ||
| exit 1 | ||
| fi | ||
| echo "✅ All contractiles present" | ||