Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 7b55f0d

Browse files
Update Slack configuration in GitHub Actions (for slack-github-actions v2.0.0) (#1004)
It turns out a lot more changed in slack-github-actions v2.0.0 than their changelog suggested (update to v2.0.0 in this PR: #1002). Therefore change the configuration to fit the new expected syntax (see https://github.com/slackapi/slack-github-action/releases/tag/v2.0.0) Hopefully it now works fully correctly! Co-authored-by: Krzysztof Kiewicz <[email protected]>
1 parent 59b6876 commit 7b55f0d

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/integration-tests.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,23 +74,21 @@ jobs:
7474
if: ${{ failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
7575
uses: slackapi/[email protected]
7676
with:
77-
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
78-
slack-message: |
79-
:exclamation: *Integration tests failed.* :exclamation: <!channel>
80-
*Last commit by:* ${{ steps.get_author.outputs.author }}
81-
*Workflow run URL:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
82-
env:
83-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
77+
method: chat.postMessage
78+
token: ${{ secrets.SLACK_BOT_TOKEN }}
79+
payload: |
80+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
81+
text: ":exclamation: *Integration tests failed.* :exclamation: <@channel>\n*Last commit by:* ${{ steps.get_author.outputs.author }}\n*Workflow run URL:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
8482
8583
- name: Send Slack notification on success
8684
if: ${{ success() && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
8785
uses: slackapi/[email protected]
8886
with:
89-
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
90-
slack-message: |
91-
:white_check_mark: *Integration tests passed.* Good job team!
92-
*Last commit by:* ${{ steps.get_author.outputs.author }}
93-
*Workflow run URL:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
87+
method: chat.postMessage
88+
token: ${{ secrets.SLACK_BOT_TOKEN }}
89+
payload: |
90+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
91+
text: ":white_check_mark: *Integration tests passed.* Good job team!\n*Last commit by:* ${{ steps.get_author.outputs.author }}\n*Workflow run URL:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
9492
env:
9593
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
9694

0 commit comments

Comments
 (0)