diff --git a/.github/workflows/release-health-check.yml b/.github/workflows/release-health-check.yml new file mode 100644 index 00000000..70ffe860 --- /dev/null +++ b/.github/workflows/release-health-check.yml @@ -0,0 +1,30 @@ +name: "Release Health Check" + +on: + # 매 3시간마다 수행 + schedule: + - cron: "0 0 */3 * *" + +jobs: + healthcheck: + # ubuntu 버전 지정 + runs-on: ubuntu-22.04 + steps: + # 릴리즈 서버 헬스 체크 진행 + - name: Release API Health Check + uses: jtalk/url-health-check-action@v3 + with: + url: ${{ secrets.RELEASE_URI }} + max-attempts: 3 # 시도 횟수 + retry-delay: 1s # 시도 간격 + + # 헬스 체크 결과 슬랙으로 연동 + - name: action-slack + uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + author_name: Github Action Health Check + fields: repo,message,commit,action,eventName,ref,workflow,job,took # 보낼 정보들 + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required + if: always() # 스크립트 성공/실패 여부에 상관없이 항상 수행되도록 설정 \ No newline at end of file