feat: 파일명에 [한국어 키] 영어 패턴 지원 #2
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
| 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" |