Skip to content

Commit

Permalink
chore: add slack notifications for process evals
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Aug 28, 2024
1 parent 11aedd1 commit 950f5c0
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 1 deletion.
68 changes: 68 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,71 @@ jobs:
env:
WALLET: ${{ secrets.WALLET }}
IO_NETWORK_PROCESS_ID: ${{ vars.IO_NETWORK_PROCESS_ID }}

- name: Notify Success
if: success()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: Evolved IO Process!
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CUSTOM_PAYLOAD: |
{
"text": "Evolved IO Process!",
"attachments": [{
"fallback": "EVOLVED IO Process!",
"color": "good",
"title": "Test Results",
text: 'The IO Process has passed all observation tests!',
"fields": [{
"title": "Network",
"value": "${{ github.ref_name == 'main' && 'testnet' || 'devnet' }}",
"short": true
},
{
"title": "Process ID",
"value": "${{ vars.IO_NETWORK_PROCESS_ID }}",
"short": true
},
{
"title": "View on ao.link",
"value": "https://www.ao.link/#/entity/${{ vars.IO_NETWORK_PROCESS_ID }}?tab=source-code",
"short": false
}
]
}]
}
- name: Notify Failure
if: failure()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: danger
SLACK_TITLE: IO Process Evolution Failed!
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CUSTOM_PAYLOAD: |
{
"text": "IO Process Evolution Failed!",
"attachments": [{
"fallback": "IO Process Evolution Failed!",
"color": "danger",
"title": "Evolution Failure",
"text": "The IO Process evolution has failed.",
"fields": [{
"title": "Network",
"value": "${{ github.ref_name == 'main' && 'testnet' || 'devnet' }}",
"short": true
},
{
"title": "Process ID",
"value": "${{ vars.IO_NETWORK_PROCESS_ID }}",
"short": true
},
{
"title": "GitHub Action",
"value": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"short": false
}
]
}]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"test:integration": "yarn build && node --test --experimental-wasm-memory64 **/*.test.mjs",
"test:unit": "busted . && luacov",
"test": "yarn test:unit && yarn test:integration",
"monitor": "node tests/monitor/monitor.test.mjs",
"monitor": "node --test tests/monitor/monitor.test.mjs",
"evolve": "yarn build && node tools/evolve.mjs"
},
"devDependencies": {
Expand Down

0 comments on commit 950f5c0

Please sign in to comment.