Network Explorer: GitHub Actions - notification messages

This commit is contained in:
Mark Sinclair
2021-10-04 11:22:37 +01:00
parent 487b894f3d
commit 2197062372
+7 -7
View File
@@ -42,16 +42,15 @@ jobs:
EXCLUDE: "/dist/, /node_modules/"
- name: Setup message creation
run: npm install -g hbs-cli
- name: Setup message data
run: |
echo "{ \"github\": ${{ toJSON(github) }}, \"env\": ${{ toJSON(env) }}, \"secrets\": { \"NYM_CI_WWW_BASE\": \"${{ secrets.NYM_CI_WWW_BASE }}\" } }" > message_data.json
- name: Create success message
if: ${{ success() }}
env:
HANDLEBARS_JSON_DATA: "{ \"github\": ${{ toJSON(github) }}, \"env\": ${{ toJSON(env) }}, \"secrets\": { \"NYM_CI_WWW_BASE\": \"${{ secrets.NYM_CI_WWW_BASE }}\" } }"
run: echo $HANDLEBARS_JSON_DATA | hbs --stdin --stdout .github/workflows/support-files/messages/success > message.txt
run: hbs --data message_data.json --stdout .github/workflows/support-files/messages/success > message.txt
- name: Create failure message
if: ${{ failure() }}
env:
HANDLEBARS_JSON_DATA: "{ \"github\": ${{ toJSON(github) }}, \"env\": ${{ toJSON(env) }}, \"secrets\": { \"NYM_CI_WWW_BASE\": \"${{ secrets.NYM_CI_WWW_BASE }}\" } }"
run: echo $HANDLEBARS_JSON_DATA | hbs --stdin --stdout .github/workflows/support-files/messages/failure > message.txt
run: hbs --data message_data.json --stdout .github/workflows/support-files/messages/failure > message.txt
- name: Keybase Notification
uses: docker://keybaseio/client:stable
env:
@@ -59,4 +58,5 @@ jobs:
KEYBASE_PAPERKEY: "${{ secrets.KEYBASE_NYMBOT_PAPERKEY }}"
KEYBASE_SERVICE: "1"
with:
args: cat message.txt | keybase chat send --channel "#dev-product-ci" ${{ secrets.KEYBASE_NYMBOT_TEAM }}
args: |
cat message.txt | keybase chat send --channel "#dev-product-ci" ${{ secrets.KEYBASE_NYMBOT_TEAM }}