Skip to content

Commit cc01265

Browse files
committedSep 12, 2024
Send slack message on failure (test)
1 parent 8b3f00a commit cc01265

File tree

1 file changed

+25
-32
lines changed

1 file changed

+25
-32
lines changed
 

‎.github/workflows/db_export.yaml

+25-32
Original file line numberDiff line numberDiff line change
@@ -40,39 +40,32 @@ jobs:
4040
pip install -r requirements.txt
4141
pip install .
4242
43-
- name: Run Pipeline
44-
env:
45-
BASIC_AUTHS: ${{ secrets.BASIC_AUTHS }}
46-
HDX_KEY: ${{ secrets.HDX_BOT_SCRAPERS_API_TOKEN }}
47-
run: python3.11 -m hapi.pipelines.app -db "postgresql+psycopg://postgres:postgres@localhost:5432/hapi"
43+
# - name: Run Pipeline
44+
# env:
45+
# BASIC_AUTHS: ${{ secrets.BASIC_AUTHS }}
46+
# HDX_KEY: ${{ secrets.HDX_BOT_SCRAPERS_API_TOKEN }}
47+
# run: python3.11 -m hapi.pipelines.app -db "postgresql+psycopg://postgres:postgres@localhost:5432/hapi"
4848

49-
- name: Dump PostgreSQL Views
50-
run: |
51-
./dump_views.sh
49+
# - name: Dump PostgreSQL Views
50+
# run: |
51+
# ./dump_views.sh
5252

53-
- name: Commit updated DB export
54-
uses: JamesIves/github-pages-deploy-action@v4
55-
with:
56-
branch: db-export
57-
folder: database
58-
target-folder: database
53+
# - name: Commit updated DB export
54+
# uses: JamesIves/github-pages-deploy-action@v4
55+
# with:
56+
# branch: db-export
57+
# folder: database
58+
# target-folder: database
5959

60-
- name: Archive warnings and errors
61-
uses: actions/upload-artifact@v4
62-
with:
63-
name: warnings-errors
64-
path: warnings_errors.log
60+
# - name: Archive warnings and errors
61+
# uses: actions/upload-artifact@v4
62+
# with:
63+
# name: warnings-errors
64+
# path: warnings_errors.log
6565

66-
- name: Send mail
67-
if: failure()
68-
uses: dawidd6/action-send-mail@v3
69-
with:
70-
server_address: ${{secrets.EMAIL_SERVER}}
71-
server_port: ${{secrets.EMAIL_PORT}}
72-
username: ${{secrets.EMAIL_USERNAME}}
73-
password: ${{secrets.EMAIL_PASSWORD}}
74-
subject: "FAILED: ${{github.repository}} database export job"
75-
body: GitHub Actions database export job for ${{github.repository}} failed!
76-
to: ${{secrets.EMAIL_LIST}}
77-
from: ${{secrets.EMAIL_FROM}}
78-
content_type: text/html
66+
- name: Send slack message
67+
# if: failure()
68+
run: |
69+
curl -X POST -H 'Content-type: application/json' \
70+
--data "{\"text\":\"Build failed! Check the run details: https://github.com/hapi-pipelines-prod/actions/runs/${{ github.run_id }}\"}" \
71+
${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)