Skip to content

feat: 폴더명 패턴 및 상태 코드별 응답 지원 #1

feat: 폴더명 패턴 및 상태 코드별 응답 지원

feat: 폴더명 패턴 및 상태 코드별 응답 지원 #1

name: Repository Dispatch Method
# 🔄 더 모듈화된 방식: Bruno 리포에서 이벤트만 보내고, 프론트엔드 리포에서 처리
#
# 이 파일: Bruno 리포에 사용
# 프론트엔드 리포: frontend-workflow.example.yml 사용
on:
push:
branches:
- main
paths:
- '**.bru'
jobs:
trigger-frontend:
runs-on: ubuntu-latest
steps:
# GitHub App 토큰 생성
- name: Generate GitHub App Token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
# ⚠️ 변경 필요
owner: YOUR_GITHUB_USERNAME
repositories: "YOUR_FRONTEND_REPO"
# Repository Dispatch 이벤트 전송
- name: Trigger Frontend Workflow
run: |
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/YOUR_USERNAME/YOUR_FRONTEND_REPO/dispatches \
-d '{
"event_type": "bruno_updated",
"client_payload": {
"sha": "${{ github.sha }}",
"ref": "${{ github.ref }}",
"repository": "${{ github.repository }}",
"actor": "${{ github.actor }}"
}
}'
- name: Log
run: |
echo "✅ Frontend workflow triggered successfully"
echo "Repository: YOUR_USERNAME/YOUR_FRONTEND_REPO"
echo "Event: bruno_updated"