Notify team chat of GitHub Actions runs.
PiperOrigin-RevId: 569231063 Change-Id: I9e66b90ff944e9a6a0898e336c7f049a07c3609d
This commit is contained in:
committed by
Copybara-Service
parent
8e00f8029e
commit
7e5711ad36
@@ -228,3 +228,13 @@ jobs:
|
|||||||
run: >
|
run: >
|
||||||
source ${{ matrix.tmpdir }}/venv/bin/activate &&
|
source ${{ matrix.tmpdir }}/venv/bin/activate &&
|
||||||
pytest -v --pyargs mujoco
|
pytest -v --pyargs mujoco
|
||||||
|
- name: Notify team chat
|
||||||
|
if: ${{ always() && github.event_name == "push" }}
|
||||||
|
env:
|
||||||
|
GCHAT_API: "${{ secrets.GCHAT_API }}"
|
||||||
|
RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
|
RUN_RESULT: ${{ success() && 'SUCCEEDED' || 'FAILED' }}
|
||||||
|
run: >
|
||||||
|
curl -X POST "$GCHAT_API"
|
||||||
|
-H "Content-Type: application/json"
|
||||||
|
-d '{"text": "GitHub Actions run *$RUN_RESULT* for commit <$RUN_URL|$(echo $GITHUB_SHA | head -c6)\n\n${{ github.event.head_commit.message }}>."}'
|
||||||
|
|||||||
Reference in New Issue
Block a user