diff --git a/.github/workflows/cicd-2-publish.yaml b/.github/workflows/cicd-2-publish.yaml index 27eab8cd1..57d0905a8 100644 --- a/.github/workflows/cicd-2-publish.yaml +++ b/.github/workflows/cicd-2-publish.yaml @@ -136,20 +136,14 @@ jobs: # asset_path: ./build/lambda.zip # asset_name: lambda-${{ needs.metadata.outputs.version }}.zip # asset_content_type: application/zip - success: - name: "Success notification" - runs-on: ubuntu-latest - needs: [publish] - steps: - - name: "Check prerequisites for notification" - id: check - run: echo "secret_exist=${{ secrets.TEAMS_NOTIFICATION_WEBHOOK_URL != '' }}" >> $GITHUB_OUTPUT - - name: "Notify on publishing packages" - if: steps.check.outputs.secret_exist == 'true' - uses: nhs-england-tools/notify-msteams-action@v1.0.0 + - name: "Notify Slack on PR merge" + uses: slackapi/slack-github-action@v2.1.0 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - teams-webhook-url: ${{ secrets.TEAMS_NOTIFICATION_WEBHOOK_URL }} - message-title: "Notification title" - message-text: "This is a notification body" - link: ${{ github.event.pull_request.html_url }} + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: webhook-trigger + payload: | + status: "${{ job.status }}" + link: "https://github.com/${{ github.repository }}/commit/${{ github.sha }}" + Author: "${{ github.actor }}" + title: "Pushed to main" + version: "${{ needs.metadata.outputs.version }}"