Skip to content

Commit fd8f17d

Browse files
committed
refactor: 메세지 전송 방식 변경
1 parent 7eb9e96 commit fd8f17d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

.github/workflows/process-e2e.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,24 @@ jobs:
5858
NEXT_PUBLIC_SENTRY_AUTH_TOKEN: 'sample_token'
5959
NEXT_PUBLIC_SENTRY_DSN: 'sample_dsn'
6060

61+
# KST 시간을 GitHub Actions 환경 변수에 세팅
62+
- name: Get Current KST Time
63+
run: echo "KST_TIME=$(TZ=Asia/Seoul date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
64+
6165
- name: Upload screenshots
6266
uses: actions/upload-artifact@v4
6367
if: failure()
6468
with:
6569
name: cypress-screenshots
6670
path: cypress/screenshots
6771

68-
slackNotify:
69-
runs-on: ubuntu-latest
72+
- name: Send Slack Notification on Failure
7073

71-
steps:
72-
- name: Notify message to slack
73-
uses: rtCamp/action-slack-notify@v2
74+
uses: slackapi/[email protected]
75+
with:
76+
payload: |
77+
{
78+
"text": "* FE E2E CI Test *\n\n❌ *Status:* Failure\n📅 *Timestamp (KST):* ${{ env.KST_TIME }}\n🔗 *Workflow URL:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Workflow>"
79+
}
7480
env:
75-
SLACK_WEBHOOK: ${{ secrets.GIT_ACTION_SLACK_WEBHOOK }}
76-
SLACK_CHANNEL: ${{ secrets.GIT_ACTION_SLACK_CHANNEL }}
77-
SLACK_COLOR: ${{ job.status }} # 또는 'green', '#ff00ff' 처럼 직접 색상 지정
78-
SLACK_USERNAME: Github
79-
SLACK_ICON: https://cdn-icons-png.flaticon.com/512/25/25231.png
80-
SLACK_TITLE: E2E Test
81-
SLACK_MESSAGE: 'E2E CI 테스트가 실패했습니다. Artifact를 확인해주세요.'
81+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)