-
Notifications
You must be signed in to change notification settings - Fork 23
42 lines (36 loc) · 1.61 KB
/
config_change_alert.yaml
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
name: config_change_alert
on:
push:
branches:
- staging
paths:
- config/0chain_blobber.yaml
- config/0chain_validator.yaml
pull_request:
branches:
- staging
types:
- closed
paths:
- config/0chain_blobber.yaml
- config/0chain_validator.yaml
jobs:
test:
runs-on: docker-builds
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get changed files using defaults
id: changed-files
uses: tj-actions/[email protected]
- name: Run step when a 0chain_blobber.yaml file changes
if: contains(steps.changed-files.outputs.modified_files, 'config/0chain_blobber.yaml')
run: |
echo "Your 0chain_blobber.yaml file has been modified."
curl -X POST -H 'Content-type: application/json' --data '{"text":"<!here> Your 0chain_blobber.yaml config file has been modified.\n LINK: https://github.com/0chain/blobber/blob/staging/config/0chain_blobber.yaml"}' ${{ secrets.DEVOPS_CHANNEL_WEBHOOK_URL }}
- name: Run step when a 0chain_validator.yaml file changes
if: contains(steps.changed-files.outputs.modified_files, 'config/0chain_validator.yaml')
run: |
echo "Your 0chain_validator.yaml file has been modified."
curl -X POST -H 'Content-type: application/json' --data '{"text":"<!here> Your 0chain_validator.yaml config file has been modified.\n LINK: https://github.com/0chain/blobber/blob/staging/config/0chain_validator.yaml"}' ${{ secrets.DEVOPS_CHANNEL_WEBHOOK_URL }}