From 58c72111afc00042cd5187690003bed7478d85dd Mon Sep 17 00:00:00 2001 From: vinayakgautamops <95210787+vinayakgautamops@users.noreply.github.com> Date: Fri, 1 Apr 2022 10:40:50 +0530 Subject: [PATCH] Created config_change_alert.yaml --- .github/workflows/config_change_alert.yaml | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/config_change_alert.yaml diff --git a/.github/workflows/config_change_alert.yaml b/.github/workflows/config_change_alert.yaml new file mode 100644 index 000000000..cdd5c13b8 --- /dev/null +++ b/.github/workflows/config_change_alert.yaml @@ -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_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":"Your 0chain_blobber.yaml config file has been modified."}' ${{ secrets.CHAT_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":"Your 0chain_validator.yaml config file has been modified."}' ${{ secrets.CHAT_WEBHOOK_URL }}