From e27a97d88480b6977d2ea44dd243c64c3b73de0a Mon Sep 17 00:00:00 2001 From: kirrg001 Date: Wed, 15 May 2024 15:23:10 +0200 Subject: [PATCH] chore: moved to gh action slack webhooks - chat:write is no longer allowed - switched from circle ci app to our own app for tracer team node.js --- .github/workflows/create-gh-release.yml | 8 ++++---- .github/workflows/release.yaml | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/create-gh-release.yml b/.github/workflows/create-gh-release.yml index bb66dac6ee..bb88e02d0e 100644 --- a/.github/workflows/create-gh-release.yml +++ b/.github/workflows/create-gh-release.yml @@ -42,7 +42,6 @@ jobs: if: "${{ success() }}" uses: slackapi/slack-github-action@v1.21.0 with: - channel-id: ${{ secrets.SLACK_CHANNEL_ID_TEAM }} payload: | { "text": "Github release has been created successfully! :tada:", @@ -57,13 +56,13 @@ jobs: }] } env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_TEAM_NODE_CHANNEL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - name: Send failure message if: "${{ failure() }}" uses: slackapi/slack-github-action@v1.21.0 with: - channel-id: ${{ secrets.SLACK_CHANNEL_ID_TEAM }} payload: | { "text": ":boom: :scream: Github Release has failed! :scream_cat: :sob:", @@ -72,4 +71,5 @@ jobs: }] } env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_TEAM_NODE_CHANNEL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a0a714597b..01649b001f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -91,7 +91,6 @@ jobs: if: "${{ success() && env.DRY_RUN != 'true' }}" uses: slackapi/slack-github-action@v1.21.0 with: - channel-id: ${{ secrets.SLACK_CHANNEL_ID_TEAM }} payload: | { "text": ":mega: :package: Version ${{ steps.read_version_number.outputs.version }} has been released successfully! :star-struck: :tada:", @@ -124,13 +123,13 @@ jobs: }] } env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_TEAM_NODE_CHANNEL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - name: Send success message to release channel if: "${{ success() && env.DRY_RUN != 'true' }}" uses: slackapi/slack-github-action@v1.21.0 with: - channel-id: ${{ secrets.SLACK_CHANNEL_ID_RELEASES }} payload: | { "text": ":mega: :package: Version ${{ steps.read_version_number.outputs.version }} of the Node.js tracer (npm package @instana/collector and friends) has been released! :star-struck: :tada:", @@ -148,13 +147,13 @@ jobs: }] } env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_RELEASES_CHANNEL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - name: Send failure message if: "${{ failure() && env.DRY_RUN != 'true' }}" uses: slackapi/slack-github-action@v1.21.0 with: - channel-id: ${{ secrets.SLACK_CHANNEL_ID_TEAM }} payload: | { "text": ":boom: :scream: Releasing new package versions has failed! :scream_cat: :sob:", @@ -183,5 +182,6 @@ jobs: }] } env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_TEAM_NODE_CHANNEL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK