Skip to content

Commit 248db8c

Browse files
lualua
lua
authored and
lua
committed
adds slack channel notification
1 parent 5e48a50 commit 248db8c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/check_openapi_versions.yml

+26
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,33 @@ jobs:
2626
run: |
2727
python -m pip install --upgrade pip
2828
pip install -r scripts/requirements.txt
29+
2930
# Step 4: Run your Python script
3031
- name: Run Python script
3132
run: python ./scripts/check_openapi_version.py
3233

34+
- name: Send notification
35+
if: failure()
36+
uses: dawidd6/action-send-mail@v2
37+
with:
38+
server_address: email-smtp.eu-central-1.amazonaws.com
39+
server_port: 465
40+
username: ${{secrets.MAIL_USERNAME}}
41+
password: ${{secrets.MAIL_PASSWORD}}
42+
subject: [Plenigo][WARNING] Plenigo openapi spec version mismatch
43+
body: There is a version mismatch between the openapi spec in prod and the latest released version.
44+
to: plenigo_openapi_spec-aaaaooflpibdbm4k3xoaxq7uye@spring-media.slack.com
45+
from: '"User" <user@deepthought.cloud>' # <user@example.com>
46+
47+
- name: Send notification
48+
if: success()
49+
uses: dawidd6/action-send-mail@v2
50+
with:
51+
server_address: email-smtp.eu-central-1.amazonaws.com
52+
server_port: 465
53+
username: ${{secrets.MAIL_USERNAME}}
54+
password: ${{secrets.MAIL_PASSWORD}}
55+
subject: [Plenigo][SUCCESS] Plenigo openapi spec version is up to date.
56+
body: We are currently using the latest released version and no action is needed
57+
to: plenigo_openapi_spec-aaaaooflpibdbm4k3xoaxq7uye@spring-media.slack.com
58+
from: '"User" <user@deepthought.cloud>' # <user@example.com>

0 commit comments

Comments
 (0)