fix(ci): repair the permissions block indentation (#101) #293
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 workflow is managed by gh actions-lock. | |
| # SPDX-License-Identifier: MPL-2.0 | |
| # This workflow is managed by gh actions-lock. | |
| # This workflow is managed by gh actions-lock. | |
| # | |
| # 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 | |
| # No job-level `if:` here. It previously read | |
| # | |
| # # | |
| # and `secrets` is not available in a job-level conditional — GitHub exposes | |
| # that context only in `env:`, `with:` and step-level expressions. The file | |
| # is valid YAML, so nothing local caught it, but Actions rejected the whole | |
| # workflow at load time: every run failed in 0s, named after the file path | |
| # rather than "BoJ Server Build Trigger", with no jobs and no check run. | |
| # That is the startup_failure signature. | |
| # | |
| # Guarding here was redundant anyway: the step below already exits 0 when | |
| # BOJ_URL is empty, and `vars`/`secrets` are resolved there legally. This | |
| # workflow is documented as a no-op when BOJ_SERVER_URL is unset, and now | |
| # it actually is one instead of failing the run. | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7.0.1 | |
| - 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)" |