Skip to content

Commit

Permalink
Add 'text' key
Browse files Browse the repository at this point in the history
  • Loading branch information
jdangerx committed Nov 30, 2023
1 parent d1a64b2 commit 4832995
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/run-archiver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ jobs:
matrix:
dataset:
- eia860
- eia860m
- eia923
- epacems

fail-fast: false
runs-on: ubuntu-latest
Expand Down Expand Up @@ -75,15 +73,10 @@ jobs:
run: ls -R
- name: Munge summaries together
id: all_summaries
run: |
{
echo 'SLACK_PAYLOAD<<EOF'
./scripts/make_slack_notification_message.py --summary-files *_run_summary.json
echo EOF
} >> "$GITHUB_OUTPUT"
run: ./scripts/make_slack_notification_message.py --summary-files *_run_summary.json > slack-payload.json
- name: Inform the Codemonkeys
uses: slackapi/slack-github-action@v1.24.0
with:
payload: ${{steps.all_summaries.outputs.SLACK_PAYLOAD}}
payload-file-path: slack-payload.json
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
6 changes: 5 additions & 1 deletion scripts/make_slack_notification_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ def header_block(text):

print(
json.dumps(
{"attachments": [{"blocks": changed_blocks + unchanged_blocks}]}, indent=2
{
"text": "Archiver run completed!",
"attachments": [{"blocks": changed_blocks + unchanged_blocks}],
},
indent=2,
)
)

Expand Down

0 comments on commit 4832995

Please sign in to comment.