Skip to content

Commit

Permalink
add slack alert & cron
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacbrodsky committed Jun 7, 2024
1 parent 0d911cb commit 9cd7798
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/slack-alert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: slack-alert

on:
workflow_run:
workflows: [tests]
types: [completed]

jobs:
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Send Slack Alert
id: slack
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
Github Actions ${{ github.event.workflow_run.conclusion }}
Repo: ${{github.event.workflow_run.repository.name }}
Workflow URL: ${{ github.event.workflow_run.html_url }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [master, stable-*]
pull_request:
branches: [master, stable-*]
schedule:
# Every Sunday, rerun
- cron: "0 12 * * 0"

jobs:
tests:
Expand Down Expand Up @@ -64,7 +67,7 @@ jobs:
os: [ubuntu-latest]
java-distribution: [adopt]
java-version: [17]
dockcross-tag: ["20220906-e88a3ce", "20230116-670f7f7"]
dockcross-tag: ["20230116-670f7f7", "20240529-0dade71", "latest"]

steps:
- uses: actions/checkout@v2.1.1
Expand Down

0 comments on commit 9cd7798

Please sign in to comment.