Calio Daily Article Generator #4
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: Calio Daily Article Generator | |
| on: | |
| schedule: | |
| - cron: "0 15 * * *" # 한국 시간 기준 매일 자정 (UTC 15:00) | |
| workflow_dispatch: # 수동 실행 버튼 | |
| jobs: | |
| generate-and-pr: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write # PR을 생성하기 위해 꼭 필요한 권한 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # 모든 브랜치 이력을 가져옴 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Dependencies | |
| run: | | |
| pip install PyGithub google-generativeai python-dotenv | |
| - name: Run Generator | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
| REPO_NAME: ${{ github.repository }} | |
| run: python scripts/generate_article.py | |
| - name: Set Date Environment Variable | |
| run: | | |
| echo "CURRENT_DATE=$(TZ='Asia/Seoul' date +'%Y-%m-%d')" >> $GITHUB_ENV | |
| echo "CURRENT_DATETIME=$(TZ='Asia/Seoul' date +'%Y-%m-%d %H:%M KST')" >> $GITHUB_ENV | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "docs: 📝 [Calio] 개발 일지 생성" | |
| branch: auto-daily-log | |
| delete-branch: true # PR이 머지되면 브랜치 자동 삭제 | |
| title: "📝 [Calio] 오늘의 개발 아티클이 도착했습니다! (${{ env.CURRENT_DATE }})" | |
| body: | | |
| ## 🤖 Calio AI Daily Report | |
| 오늘의 작업 내역과 코드 변경점을 분석하여 생성된 리포트입니다. | |
| - **브랜치:** 모든 활성 브랜치 스캔 | |
| - **생성일:** ${{ env.CURRENT_DATETIME }} | |
| 내용을 검토하신 후 `develop` 브랜치로 머지해 주세요! | |
| base: develop # PR을 보낼 대상 브랜치 | |
| labels: | | |
| documentation | |
| ai-generated |