-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1118 from 0chain/alert-final
created config_change_alert.yaml
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: config_change_alert | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
pull_request: | ||
branches: | ||
- staging | ||
|
||
jobs: | ||
test: | ||
runs-on: docker-builds | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. | ||
|
||
- name: Get changed files using defaults | ||
id: changed-files | ||
uses: tj-actions/changed-files@v18.4 | ||
|
||
- name: Run step when a 0chain.yaml file changes | ||
if: contains(steps.changed-files.outputs.modified_files, 'docker.local/config/0chain.yaml') | ||
run: | | ||
echo "Your 0chain.yaml file has been modified." | ||
curl -X POST -H 'Content-type: application/json' --data '{"text":"Your 0chain.yaml config file has been modified."}' ${{ secrets.CHAT_WEBHOOK_URL }} | ||
- name: Run step when a sc.yaml file changes | ||
if: contains(steps.changed-files.outputs.modified_files, 'docker.local/config/sc.yaml') | ||
run: | | ||
echo "Your sc.yaml file has been modified." | ||
curl -X POST -H 'Content-type: application/json' --data '{"text":"Your sc.yaml config file has been modified."}' ${{ secrets.CHAT_WEBHOOK_URL }} |