Skip to content

Commit

Permalink
ci: run every 12 hours, and tag me on failure (#1041)
Browse files Browse the repository at this point in the history
  • Loading branch information
tushar-composio authored Dec 19, 2024
1 parent 36b0733 commit cc3ec3d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: main_workflow
on:
# Run a cron job every 12 hours
schedule:
- cron: '0 */12 * * *'
push:
branches:
- master
Expand Down Expand Up @@ -104,6 +107,19 @@ jobs:
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Slack Notification on Failure
if: ${{ failure() && github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, 'release') && !contains(github.event.head_commit.message, 'Release') && !inputs.dont_notify }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_TECH_WEBHOOK }}
SLACK_TITLE: "Example Tests Failed"
SLACK_MSG_AUTHOR: ${{ inputs.author || github.actor }}
SLACK_MESSAGE: "<@viraj> <@tushar sadhwani> ${{ inputs.commit_message || github.event.head_commit.message }}"
SLACK_LINK_NAMES: "true"
SLACK_COLOR: "failure"
SLACK_USERNAME: "GitHub Actions Bot"
SLACK_ICON_EMOJI: ":x:"
SLACK_FOOTER: "Failed Example Tests | GitHub Actions"

swe:
defaults:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Example Tests

on:
# Run a cron job every 12 hours
schedule:
- cron: '0 */12 * * *'
workflow_call:
inputs:
working-directory:
Expand Down Expand Up @@ -102,7 +105,7 @@ jobs:
SLACK_WEBHOOK: ${{ secrets.SLACK_TECH_WEBHOOK }}
SLACK_TITLE: "Example Tests Failed"
SLACK_MSG_AUTHOR: ${{ inputs.author || github.actor }}
SLACK_MESSAGE: "<@viraj> <@kaavee> ${{ inputs.commit_message || github.event.head_commit.message }}"
SLACK_MESSAGE: "<@viraj> <@tushar sadhwani> ${{ inputs.commit_message || github.event.head_commit.message }}"
SLACK_LINK_NAMES: "true"
SLACK_COLOR: "failure"
SLACK_USERNAME: "GitHub Actions Bot"
Expand Down

0 comments on commit cc3ec3d

Please sign in to comment.