diff --git a/.github/workflows/bump-elastic-stack-snapshot.yml b/.github/workflows/bump-elastic-stack-snapshot.yml index 804ef8226ed..0cc6355341a 100644 --- a/.github/workflows/bump-elastic-stack-snapshot.yml +++ b/.github/workflows/bump-elastic-stack-snapshot.yml @@ -41,11 +41,13 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ failure() }} - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 + uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 with: - channel-id: '#ingest-notifications' + method: chat.postMessage + token: ${{ secrets.SLACK_BOT_TOKEN }} payload: | { + "channel": "#ingest-notifications", "text": "${{ env.SLACK_MESSAGE }}", "blocks": [ { @@ -58,5 +60,4 @@ jobs: ] } env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@update-me-with-the-slack-team-to-be-poked` please look what's going on " diff --git a/.github/workflows/bump-golang.yml b/.github/workflows/bump-golang.yml index 29ed18ade6f..3f696c1663c 100644 --- a/.github/workflows/bump-golang.yml +++ b/.github/workflows/bump-golang.yml @@ -31,11 +31,13 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ failure() }} - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 + uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 with: - channel-id: '#ingest-notifications' + method: chat.postMessage + token: ${{ secrets.SLACK_BOT_TOKEN }} payload: | { + "channel": "#ingest-notifications", "text": "${{ env.SLACK_MESSAGE }}", "blocks": [ { @@ -48,5 +50,4 @@ jobs: ] } env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@update-me-with-the-slack-team-to-be-poked` please look what's going on " diff --git a/.github/workflows/notify-stalled-snapshots.yml b/.github/workflows/notify-stalled-snapshots.yml index d70cb839c29..d76df5f8621 100644 --- a/.github/workflows/notify-stalled-snapshots.yml +++ b/.github/workflows/notify-stalled-snapshots.yml @@ -55,12 +55,15 @@ jobs: - if: ${{ contains(steps.search.outputs.found, 'true') }} name: Report obsoleted branches (slack) - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 + uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 with: - channel-id: '#ingest-notifications' - payload: ":red_circle: Elastic Stack version for the `${{ matrix.branch }}` branch has not been updated for a while (`> 7 days`). Review the (<${{ env.URL_QUERY }}|open PRs>)" - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + method: chat.postMessage + token: ${{ secrets.SLACK_BOT_TOKEN }} + payload: | + { + "channel": "#ingest-notifications", + "text": ":red_circle: Elastic Stack version for the `${{ matrix.branch }}` branch has not been updated for a while (`> 7 days`). Review the (<${{ env.URL_QUERY }}|open PRs>)" + } - if: ${{ contains(steps.search.outputs.found, 'true') }} name: Report obsoleted branches (email) diff --git a/.github/workflows/updatecli-compose.yml b/.github/workflows/updatecli-compose.yml index d92bf5b5865..7b107c28d47 100644 --- a/.github/workflows/updatecli-compose.yml +++ b/.github/workflows/updatecli-compose.yml @@ -38,11 +38,13 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ failure() }} - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 + uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 with: - channel-id: '#ingest-notifications' + method: chat.postMessage + token: ${{ secrets.SLACK_BOT_TOKEN }} payload: | { + "channel": "#ingest-notifications", "text": "${{ env.SLACK_MESSAGE }}", "blocks": [ { @@ -55,6 +57,5 @@ jobs: ] } env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@update-me-with-the-slack-team-to-be-poked` please look what's going on " \ No newline at end of file