Skip to content

Coffee Chat Matching #23

Coffee Chat Matching

Coffee Chat Matching #23

Workflow file for this run

name: Coffee Chat Matching
on:
schedule:
# 매주 월요일 UTC 00:00 (KST 09:00)
- cron: "0 0 * * 1"
workflow_dispatch:
inputs:
role:
description: "매칭할 역할 (비워두면 전체 실행)"
required: false
type: choice
options:
- ""
- coffee
- coffee-ui
jobs:
match:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Run matching
env:
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
DISCORD_SERVER_ID: ${{ vars.DISCORD_SERVER_ID }}
FORCE_RUN: ${{ github.event_name == 'workflow_dispatch' && 'true' || '' }}
MATCH_ROLE: ${{ inputs.role }}
run: bun run match
- name: Format generated files
run: bun run format
- name: Create Pull Request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
BRANCH_NAME="chore/update-match-history-$(date +%Y-%m-%d)-${{ github.run_id }}"
git checkout -b "$BRANCH_NAME"
git add data/
git diff --staged --quiet && exit 0
git commit -m "chore: update match history"
git push -u origin "$BRANCH_NAME"
gh pr create --fill --body "자동 생성된 커피챗 매칭 히스토리 업데이트입니다."