Skip to content

Commit a9ab4eb

Browse files
jakobwjenkins-bot
authored andcommitted
Report failures for build-and-publish-api-client
The code is mostly copied from the secondary-ci action. The email credentials are already available in the GitHub repo. Bug: T386387 Change-Id: Iefc709d482ef03895c09072fb40ddec211c00db7
1 parent faccf0d commit a9ab4eb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/publishRestApiClient.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,18 @@ jobs:
5252
echo "//registry.npmjs.org/:_authToken=${{ secrets.WMDE_NPM_AUTH_TOKEN }}" > ~/.npmrc
5353
cd api-client/
5454
npm publish --access public
55+
- name: Send mail
56+
if: ${{ failure() }}
57+
uses: dawidd6/[email protected]
58+
with:
59+
server_address: smtp.gmail.com
60+
server_port: 465
61+
username: ${{secrets.WMDE_CI_MAIL_USERNAME}}
62+
password: ${{secrets.WMDE_CI_MAIL_PASSWORD}}
63+
subject: Github Action job failed for Wikibase
64+
html_body: |
65+
Job build-and-publish-api-client failed!
66+
The failed job can be found <a href="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}">here</a>.
67+
The job definition can be found <a href="https://github.com/${{ github.repository }}/actions/workflows/publishRestApiClient.yml">here</a>.
68+
69+
from: Wikibase Github Action CI

0 commit comments

Comments
 (0)