Skip to content

Commit 20e4bd7

Browse files
Merge pull request #2108 from Giskard-AI/fix-slack-jobs-release
Fix slack jobs in create-release GH action
2 parents 38da672 + 6b8b751 commit 20e4bd7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/create-release.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ jobs:
6161
method: chat.postMessage
6262
token: ${{ secrets.SLACK_BOT_TOKEN }}
6363
payload: |
64-
"channel": "${{ vars.SLACK_CHANNEL_ID }}",
65-
"text": "Release *${{ env.VERSION_NAME }}* is on the way :rocket:
66-
<${{ github.server_url }}/${{ github.actor }}|@${{ github.actor }}> | <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|commit> <!channel>"
64+
{
65+
"channel": "${{ vars.SLACK_CHANNEL_ID }}",
66+
"text": "Release *${{ env.VERSION_NAME }}* is on the way :rocket: <${{ github.server_url }}/${{ github.actor }}|@${{ github.actor }}> | <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|commit> <!channel>"
67+
}
6768
6869
- name: Configure git
6970
run: |
@@ -105,7 +106,6 @@ jobs:
105106
echo "JOB_SUCCESS=true" >> $GITHUB_ENV
106107
107108
- name: "@slack Share release process completion"
108-
# cancellable always() https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
109109
if: ${{ !cancelled() }}
110110
uses: slackapi/[email protected]
111111
env:
@@ -119,7 +119,9 @@ jobs:
119119
method: chat.postMessage
120120
token: ${{ secrets.SLACK_BOT_TOKEN }}
121121
payload: |
122-
"channel": "${{ vars.SLACK_CHANNEL_ID }}",
123-
"text": "${{ env.JOB_SUCCESS == 'true' && env.ON_SUCCESS || env.ON_FAILURE }}",
124-
"thread_ts": "${{ steps.slack.outputs.ts }}",
125-
"reply_broadcast": true
122+
{
123+
"channel": "${{ vars.SLACK_CHANNEL_ID }}",
124+
"text": "${{ env.JOB_SUCCESS == 'true' && env.ON_SUCCESS || env.ON_FAILURE }}",
125+
"thread_ts": "${{ steps.slack.outputs.ts }}",
126+
"reply_broadcast": true
127+
}

0 commit comments

Comments
 (0)