Network Explorer: GitHub Actions - handle env differently

This commit is contained in:
Mark Sinclair
2021-10-01 15:47:57 +01:00
parent 68a43e33b9
commit e6879dba63
+6 -2
View File
@@ -15,8 +15,6 @@ defaults:
jobs:
build:
runs-on: ubuntu-latest
env:
HANDLEBARS_JSON_DATA: "{ \"github\": ${{ toJSON(github) }}, \"env\": ${{ toJSON(env) }}, \"secrets\": { \"NYM_CI_WWW_BASE\": ${{ secrets.NYM_CI_WWW_BASE }} } }"
steps:
- uses: actions/checkout@v2
- name: Install rsync
@@ -45,12 +43,18 @@ jobs:
- name: Setup message creation
run: npm install -g hbs-cli
- name: Output message JSON
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
- 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
- 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
- name: Keybase Notification
uses: docker://keybaseio/client:stable