Skip to content

on PR only

on PR only #31

name: Failure Notification
on:
push:
pull_request:
schedule:
- cron: "0-58/2 * * * *"
jobs:
failing-job:
runs-on: ubuntu-latest
steps:
- name: Announce event
run: |
echo ${{ github.event_name }}
echo ${{ github.event_name == 'pull_request' }}
- name: failing step
run: exit 1
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
needs:
- failing-job
steps:
- uses: actions/checkout@v2
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
MSG_MINIMAL: actions_url
SLACK_FOOTER: ""
SLACK_TITLE: LSST metadetect tests failing on lsst-dev
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Announce event again
run: echo ${{ github.event_name == 'pull_request' && needs.failing-job.result == 'failure' }}