-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[24.12.22 / TASK-67] Feature - 메인 배치 기본 깃액션 추가 #9
Conversation
Caution Review failedThe pull request is closed. 워크스루GitHub Actions 워크플로우 파일 변경 사항
시퀀스 다이어그램sequenceDiagram
participant GA as GitHub Actions
participant Py as Python Script
participant Velog as Velog Platform
participant Slack as Slack Notification
GA->>Py: Trigger scraping script
Py->>Velog: Fetch posts
Velog-->>Py: Return post data
alt Scraping Successful
Py->>Slack: Send success notification
else Scraping Failed
Py->>Slack: Send failure notification
end
관련 PR
제안된 리뷰어
시 🐰
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (2)
.github/workflows/run-daily-aggre.yaml (2)
41-61
: 환경 변수 설정 최적화 필요환경 변수 설정이 개별적으로 이루어져 있어 비효율적입니다. 하나의 here-document를 사용하여 더 효율적으로 작성할 수 있습니다.
다음과 같이 수정하는 것을 제안합니다:
- name: Create .env file run: | - echo "SECRET_KEY=${{ secrets.SECRET_KEY }}" >> .env - echo "DEBUG=False" >> .env - # ... (other echo commands) + cat << EOF > .env + SECRET_KEY=${{ secrets.SECRET_KEY }} + DEBUG=False + DATABASE_ENGINE=${{ secrets.DATABASE_ENGINE }} + DATABASE_NAME=${{ secrets.DATABASE_NAME }} + POSTGRES_USER=${{ secrets.POSTGRES_USER }} + POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} + POSTGRES_HOST=${{ secrets.POSTGRES_HOST }} + POSTGRES_PORT=${{ secrets.POSTGRES_PORT }} + AES_KEY_0=${{ secrets.AES_KEY_0 }} + AES_KEY_1=${{ secrets.AES_KEY_1 }} + AES_KEY_2=${{ secrets.AES_KEY_2 }} + AES_KEY_3=${{ secrets.AES_KEY_3 }} + AES_KEY_4=${{ secrets.AES_KEY_4 }} + AES_KEY_5=${{ secrets.AES_KEY_5 }} + AES_KEY_6=${{ secrets.AES_KEY_6 }} + AES_KEY_7=${{ secrets.AES_KEY_7 }} + AES_KEY_8=${{ secrets.AES_KEY_8 }} + AES_KEY_9=${{ secrets.AES_KEY_9 }} + EOF🧰 Tools
🪛 actionlint (1.7.4)
42-42: shellcheck reported issue in this script: SC2129:style:1:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects
(shellcheck)
67-105
: Slack 알림 로직 개선 필요Slack 알림 설정에 중복 코드가 있으며, 액션 버전이 최신이 아닙니다.
- Slack 액션 버전을 업데이트하고,
- 공통 로직을 환경 변수로 추출하여 중복을 제거하는 것을 제안합니다:
+ - name: Set common notification variables + run: | + echo "WORKFLOW_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV + echo "TIMESTAMP=<!date^${{ github.event.repository.updated_at }}^{date_short_pretty} {time}|Timestamp>" >> $GITHUB_ENV - name: Send Slack Notification on Success if: success() - uses: slackapi/[email protected] + uses: slackapi/[email protected] with: payload: | { "text": "✅ Velog Dashboard Daily Stats Batch Successful", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", - "text": "*Velog Dashboard Daily Stats Batch*\n\n✅ *Status:* Success\n📅 *Timestamp:* <!date^${{ github.event.repository.updated_at }}^{date_short_pretty} {time}|Timestamp>\n🔗 *Workflow URL:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + "text": "*Velog Dashboard Daily Stats Batch*\n\n✅ *Status:* Success\n📅 *Timestamp:* ${{ env.TIMESTAMP }}\n🔗 *Workflow URL:* ${{ env.WORKFLOW_URL }}" } } ] }실패 알림도 동일한 방식으로 수정해주세요.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/run-daily-aggre.yaml
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/run-daily-aggre.yaml
18-18: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
33-33: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
42-42: shellcheck reported issue in this script: SC2129:style:1:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects
(shellcheck)
옹 이런 것도 가능하군요! |
Summary by CodeRabbit
actions/cache@v4
로 업그레이드.