Skip to content

Commit 9c09cc9

Browse files
Bump slackapi/slack-github-action from 1.27.0 to 3.0.1 (#78)
* Bump slackapi/slack-github-action from 1.27.0 to 2.0.0 Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 1.27.0 to 2.0.0. - [Release notes](https://github.com/slackapi/slack-github-action/releases) - [Commits](slackapi/slack-github-action@v1.27.0...v2.0.0) --- updated-dependencies: - dependency-name: slackapi/slack-github-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Bump to 3.0.1 * Temporarily allow deployment from any branch * Temporarily allow deployment from any branch * Fix slack token reference * Test different message format * Revert "Test different message format" This reverts commit 40ab194. * Revert "Temporarily allow deployment from any branch" This reverts commit 8556e7b. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: PPawlowski <piotr@devopswizards.com>
1 parent 52b4dab commit 9c09cc9

1 file changed

Lines changed: 38 additions & 69 deletions

File tree

.github/workflows/deploy_helm_chart.yml

Lines changed: 38 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ on:
115115
jobs:
116116
diff:
117117
runs-on: ubuntu-latest
118-
if: ${{ !contains(format('{0}/{1}', 'refs/heads', inputs.deploy_branch ), github.ref ) }}
118+
# if: ${{ !contains(format('{0}/{1}', 'refs/heads', inputs.deploy_branch ), github.ref ) }}
119119
environment: ${{ inputs.environment }}
120120
permissions:
121121
contents: read
@@ -333,43 +333,28 @@ jobs:
333333
echo "LAST_COMMIT_MSG=$LAST_COMMIT_MSG" >> $GITHUB_ENV
334334
335335
- name: Send notification
336-
uses: slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3 # v1.27.1
336+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 #3.0.1
337337
id: send_notification
338338
if: ${{ fromJson( inputs.slack_notification_enabled ) }}
339339
with:
340-
channel-id: ${{ inputs.slack_channel_id }}
340+
method: 'chat.postMessage'
341+
token: ${{ secrets.slack_token }}
341342
payload: |
342-
{
343-
"blocks": [
344-
{
345-
"type": "header",
346-
"text": {
347-
"type": "plain_text",
348-
"text": "${{ inputs.chart_name }} ${{ inputs.environment }} deployment started (In Progress)",
349-
"emoji": true
350-
}
351-
},
352-
{
353-
"type": "section",
354-
"fields": [
355-
{
356-
"type": "mrkdwn",
357-
"text": "*Status:*\n:large_yellow_square: In Progress"
358-
},
359-
{
360-
"type": "mrkdwn",
361-
"text": "*Last Commit Message:*\n${{ env.LAST_COMMIT_MSG }}"
362-
},
363-
{
364-
"type": "mrkdwn",
365-
"text": "*Workflow run:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View>"
366-
}
367-
]
368-
}
369-
]
370-
}
371-
env:
372-
SLACK_BOT_TOKEN: ${{ secrets.slack_token }}
343+
channel: ${{ inputs.slack_channel_id }}
344+
blocks:
345+
- type: "header"
346+
text:
347+
type: "plain_text"
348+
text: "${{ inputs.chart_name }} ${{ inputs.environment }} deployment started (In Progress)"
349+
emoji: true
350+
- type: "section"
351+
fields:
352+
- type: "mrkdwn"
353+
text: "*Status:*\n:large_yellow_square: In Progress"
354+
- type: "mrkdwn"
355+
text: "*Last Commit Message:*\n${{ env.LAST_COMMIT_MSG }}"
356+
- type: "mrkdwn"
357+
text: "*Workflow run:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View>"
373358
374359
- name: Deploy Helm
375360
uses: bitovi/github-actions-deploy-eks-helm@29f556cf128eb1b42f834caf13b60a630ee2a20b # v1.2.12
@@ -419,40 +404,24 @@ jobs:
419404
420405
- name: Update notification
421406
if: ${{ always() && fromJson( inputs.slack_notification_enabled ) }}
422-
uses: slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3 # v1.27.1
407+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 #3.0.1
423408
with:
424-
channel-id: ${{ inputs.slack_channel_id }}
425-
update-ts: ${{ steps.send_notification.outputs.ts }}
409+
method: 'chat.update'
410+
token: ${{ secrets.slack_token }}
426411
payload: |
427-
{
428-
"blocks": [
429-
{
430-
"type": "header",
431-
"text": {
432-
"type": "plain_text",
433-
"text": "${{ inputs.chart_name }} ${{ inputs.environment }} deployment finished (Completed)",
434-
"emoji": true
435-
}
436-
},
437-
{
438-
"type": "section",
439-
"fields": [
440-
{
441-
"type": "mrkdwn",
442-
"text": "*Status:*\n${{ steps.deploy.outcome == 'success' && ':white_check_mark: Success' || ':x: Failure '}}"
443-
},
444-
{
445-
"type": "mrkdwn",
446-
"text": "*Last Commit Message:*\n${{ env.LAST_COMMIT_MSG }}"
447-
},
448-
{
449-
"type": "mrkdwn",
450-
"text": "*Workflow run:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View>"
451-
}
452-
]
453-
}
454-
]
455-
}
456-
env:
457-
SLACK_BOT_TOKEN: ${{ secrets.slack_token }}
458-
412+
channel: ${{ inputs.slack_channel_id }}
413+
ts: ${{ steps.send_notification.outputs.ts }}
414+
blocks:
415+
- type: "header"
416+
text:
417+
type: "plain_text"
418+
text: "${{ inputs.chart_name }} ${{ inputs.environment }} deployment finished (Completed)"
419+
emoji: true
420+
- type: "section"
421+
fields:
422+
- type: "mrkdwn"
423+
text: "*Status:*\n${{ steps.deploy.outcome == 'success' && ':white_check_mark: Success' || ':x: Failure '}}"
424+
- type: "mrkdwn"
425+
text: "*Last Commit Message:*\n${{ env.LAST_COMMIT_MSG }}"
426+
- type: "mrkdwn"
427+
text: "*Workflow run:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View>"

0 commit comments

Comments
 (0)