-
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.31 KB
/
Copy pathboj-build.yml
File metadata and controls
35 lines (35 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# SPDX-License-Identifier: MPL-2.0
#
# 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 the BOJ_SERVER_URL repository secret (e.g., http://boj-server.local:7700)
# To disable: delete this file or leave the secret unset.
#
name: BoJ Server Build Trigger
on:
push:
branches: [main, master]
workflow_dispatch:
jobs:
trigger-boj:
runs-on: ubuntu-latest
timeout-minutes: 10
if: ${{ vars.BOJ_SERVER_URL != '' || secrets.BOJ_SERVER_URL != '' }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Trigger BoJ Server (Casket/ssg-mcp)
env:
BOJ_URL: ${{ secrets.BOJ_SERVER_URL || vars.BOJ_SERVER_URL }}
run: |
if [ -z "$BOJ_URL" ]; then
echo "BOJ_SERVER_URL not configured — skipping"
exit 0
fi
curl -sf -X POST "${BOJ_URL}/cartridges/ssg-mcp/invoke" \
-H "Content-Type: application/json" \
-d "{\"repo\": \"${{ github.repository }}\", \"branch\": \"${{ github.ref_name }}\", \"engine\": \"casket\"}" \
|| echo "BoJ server unreachable — skipping (non-fatal)"
permissions:
contents: read