115115jobs :
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