-
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.29 KB
/
Copy pathboj-build.yml
File metadata and controls
34 lines (34 loc) · 1.29 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
# 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
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 }}
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