-
Notifications
You must be signed in to change notification settings - Fork 86
46 lines (40 loc) · 1.27 KB
/
notify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# The name of this GH action
name: Notify
# Defines when this action should be run
on:
# Run on any Push
push:
branches:
- jp
jobs:
# A task that notifies Netlify of changes to the jp branch
notify-from-jp:
# We run this on the latest ubuntu
runs-on: ubuntu-latest
timeout-minutes: 3
strategy:
matrix:
node-version: [14.x]
steps:
- name: "Trigger Netlify deployment"
uses: joelwmale/webhook-action@2.0.2
env:
WEBHOOK_URL: ${{ secrets.NETLIFY_BOXDEV_JP_WEBHOOK }}
data: "{}"
- name: Send Slack notification
uses: Ilshidur/action-slack@2.0.2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: GitHub Actions
SLACK_AVATAR: "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4"
with:
args: "Pushed latest Markdown to `jp` branch :rocket:"
- name: Send Slack notification
uses: Ilshidur/action-slack@2.0.2
if: ${{ failure() }}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: GitHub Actions
SLACK_AVATAR: "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4"
with:
args: "Error running `deploy-jp` job in OpenAPI CI"