Run Concert Crawler #3
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: Run Concert Crawler | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| run-crawler: | |
| runs-on: ubuntu-latest | |
| # 워크플로우가 이슈를 생성할 수 있도록 권한 부여 | |
| permissions: | |
| contents: write | |
| issues: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run crawler | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| run: | | |
| python crawlAI.py | |
| - name: Commit and push changes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "chore: 새로운 인터파크 콘서트 정보 업데이트" | |
| file_pattern: "crawl_new_concerts/*.json" | |
| - name: Create GitHub Issue on new data | |
| uses: stefanzweifel/git-auto-commit-action@v6 | |
| with: | |
| # 이슈 제목을 설정합니다. | |
| title: "🎶 인터파크 새로운 콘서트 정보 업데이트 (${{ env.TODAY }})" | |
| # 이슈 내용을 설정합니다. Markdown을 사용할 수 있습니다. | |
| body: | | |
| 크롤러가 새로운 콘서트 정보를 발견하여 업데이트했습니다. | |
| - **생성된 파일:** `${{ env.TODAY }}.json` | |
| - **자세히 보기:** [리포지토리에서 최신 커밋 확인하기](${{ github.server_url }}/${{ github.repository }}/commit/${{ steps.commit.outputs.commit_hash }}) | |
| 내용을 확인해주세요! | |
| # 이슈에 자동으로 라벨을 달아줍니다 | |
| labels: "콘서트, 크롤링" | |
| env: | |
| # 날짜 변수를 설정 | |
| TODAY: $(TZ=Asia/Seoul date +'%Y-%m-%d') |