Skip to content

Observer

Observer #71

Workflow file for this run

name: Observer
# Controls when the workflow will run
on:
workflow_run:
workflows: ["Angular GitHub CI"]
types: [completed]
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@master
- shell: bash
env:
GOTIFY_API_BASE: ${{ secrets.gotify_api_base }}
GOTIFY_APP_TOKEN: ${{ secrets.gotify_app_token }}
run: |
curl --silent --output /dev/null "$GOTIFY_API_BASE/message?token=$GOTIFY_APP_TOKEN" -F "title=Workflow Success" -F "message=Success on Angular GitHub CI workflow" -F "priority=6"
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- uses: actions/checkout@master
- shell: bash
env:
GOTIFY_API_BASE: ${{ secrets.gotify_api_base }}
GOTIFY_APP_TOKEN: ${{ secrets.gotify_app_token }}
run: |
curl --silent --output /dev/null "$GOTIFY_API_BASE/message?token=$GOTIFY_APP_TOKEN" -F "title=Workflow Error" -F "message=Error on Angular GitHub CI workflow" -F "priority=6"