[사례] 테스트 중입니다. (2026) #1
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: Process case submission | |
| on: | |
| issues: | |
| types: [opened, edited, labeled] | |
| permissions: | |
| contents: write | |
| issues: write | |
| concurrency: | |
| group: case-submission-${{ github.event.issue.number }} | |
| cancel-in-progress: false | |
| jobs: | |
| process: | |
| if: contains(github.event.issue.labels.*.name, 'case-submission') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Process issue | |
| env: | |
| ISSUE_NUMBER: ${{ github.event.issue.number }} | |
| ISSUE_BODY: ${{ github.event.issue.body }} | |
| ISSUE_URL: ${{ github.event.issue.html_url }} | |
| run: node .github/scripts/process-case-issue.mjs | |
| - name: Commit changes | |
| id: commit | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add apps/front/data apps/front/src/static/accidents-data.generated.ts | |
| if git diff --cached --quiet; then | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| echo "No changes to commit." | |
| else | |
| git commit -m "data: add case from issue #${{ github.event.issue.number }}" | |
| git push | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Comment on issue | |
| if: steps.commit.outputs.changed == 'true' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| await github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '사례 데이터가 추가되었습니다. 다음 빌드부터 사이트에 반영됩니다.', | |
| }) |