Skip to content

fix(ci): estate-wide foundational remediation #47

fix(ci): estate-wide foundational remediation

fix(ci): estate-wide foundational remediation #47

Workflow file for this run

# SPDX-License-Identifier: MPL-2.0

Check failure on line 1 in .github/workflows/boj-build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/boj-build.yml

Invalid workflow file

(Line: 22, Col: 9): Unrecognized named-value: 'secrets'. Located at position 30 within expression: vars.BOJ_SERVER_URL != '' || secrets.BOJ_SERVER_URL != ''
#
# 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:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
trigger-boj:
runs-on: ubuntu-latest
timeout-minutes: 15
if: ${{ vars.BOJ_SERVER_URL != '' || secrets.BOJ_SERVER_URL != '' }}
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- 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)"