Skip to content

Commit 0cff766

Browse files
authored
[CICD-68] Add e2e cron schedule with Slack integration on failure (#37)
* Add e2e cron schedule with Slack integration on failure * Trigger slack notification only on main branch
1 parent 24c8aaf commit 0cff766

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/e2e-deploy.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Test e2e Deploy to WP Engine
22
on:
3+
schedule:
4+
- cron: '*/5 * * * *'
35
push:
46
branches:
57
- main
@@ -38,3 +40,12 @@ jobs:
3840
- name: Validate deploy results
3941
run: |
4042
[ ${{needs.run_action.outputs.status}} = "pass" ] || exit 1
43+
- name: Notify slack on failure
44+
if: success() && github.ref == 'refs/heads/main'
45+
env:
46+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
47+
uses: voxmedia/github-action-slack-notify-build@v1
48+
with:
49+
channel: status-github-action
50+
status: FAILED
51+
color: danger

0 commit comments

Comments
 (0)