From 0f63e33fc1ef0603c82668120e7a68919f4644f7 Mon Sep 17 00:00:00 2001 From: Daniel <77058885+0xDEnYO@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:58:52 +0700 Subject: [PATCH] Update git actions to send messages to Slack instead of Discord (#972) * replace discord with slack step * actions updated to push messages to Slack instead of Discord --- .github/workflows/diamondEmergencyPause.yml | 12 ++++++------ .github/workflows/networkSecretsChecker.yml | 13 ++++++------- .github/workflows/unreviewedPRReminder.yml | 12 ++++++------ .github/workflows/updateScriptConfigReminder.yml | 11 ++++++----- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/diamondEmergencyPause.yml b/.github/workflows/diamondEmergencyPause.yml index e880024cb..70623e806 100644 --- a/.github/workflows/diamondEmergencyPause.yml +++ b/.github/workflows/diamondEmergencyPause.yml @@ -87,10 +87,10 @@ jobs: ETH_NODE_URI_ZKSYNC: ${{ secrets.ETH_NODE_URI_ZKSYNC }} PRIVATE_KEY_PAUSER_WALLET: ${{ secrets.PRIV_KEY_PAUSER_WALLET }} - - name: Send Discord message - uses: Ilshidur/action-discord@0.3.2 + - name: Send Reminder to Slack SC-general Channel + uses: slackapi/slack-github-action@v2.0.0 with: - args: | - :warning: 'ATTENTION - the emergency diamond pause action was just executed by ${{ github.actor }}' - env: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_DEV_SMARTCONTRACTS }} + webhook: ${{ secrets.SLACK_WEBHOOK_SC_GENERAL }} + webhook-type: incoming-webhook + payload: | + text: 'ATTENTION - the emergency diamond pause action was just executed by ${{ github.actor }}' diff --git a/.github/workflows/networkSecretsChecker.yml b/.github/workflows/networkSecretsChecker.yml index b164ccdae..0ad565f34 100644 --- a/.github/workflows/networkSecretsChecker.yml +++ b/.github/workflows/networkSecretsChecker.yml @@ -56,12 +56,11 @@ jobs: echo -e "\033[32mFound a RPC URL for each active network. Check passed.\033[0m" fi - - name: Send Discord message + - name: Send Reminder to Slack SC-general Channel if: env.MISSING_SECRETS != '' - uses: Ilshidur/action-discord@0.3.2 + uses: slackapi/slack-github-action@v2.0.0 with: - args: | - :warning: Missing GitHub Secrets for Networks: - ${{ env.MISSING_SECRETS }} - env: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_DEV_SMARTCONTRACTS }} + webhook: ${{ secrets.SLACK_WEBHOOK_SC_GENERAL }} + webhook-type: incoming-webhook + payload: | + text: "Missing GitHub Secrets for Network(s): ${{ env.MISSING_SECRETS }}" diff --git a/.github/workflows/unreviewedPRReminder.yml b/.github/workflows/unreviewedPRReminder.yml index 62da74a11..6fc7851af 100644 --- a/.github/workflows/unreviewedPRReminder.yml +++ b/.github/workflows/unreviewedPRReminder.yml @@ -72,10 +72,10 @@ jobs: echo -e "$OLD_PRS" echo "old_prs=$OLD_PRS" >> $GITHUB_ENV - - name: Send Discord message - if: env.old_prs != '' - uses: Ilshidur/action-discord@0.3.2 + - name: Send Reminder to Slack PR Review Channel + uses: slackapi/slack-github-action@v2.0.0 with: - args: 'Hey team, please check out the following PRs that are not yet reviewed/merged: ${{ env.old_prs }}' - env: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + webhook: ${{ secrets.SLACK_WEBHOOK_SC_REVIEW }} + webhook-type: incoming-webhook + payload: | + text: "Hey team, please check out the following PRs that are not yet reviewed/merged: ${{ env.old_prs }}" diff --git a/.github/workflows/updateScriptConfigReminder.yml b/.github/workflows/updateScriptConfigReminder.yml index 1b981f5ca..c67020535 100644 --- a/.github/workflows/updateScriptConfigReminder.yml +++ b/.github/workflows/updateScriptConfigReminder.yml @@ -12,9 +12,10 @@ jobs: notify: runs-on: ubuntu-latest steps: - - name: Send Discord message - uses: Ilshidur/action-discord@0.3.2 + - name: Send Reminder to Slack SC-general Channel + uses: slackapi/slack-github-action@v2.0.0 with: - args: "Hey team, please update your scripts/config.sh file (see config.example.sh for latest changes)" - env: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_DEV_SMARTCONTRACTS }} + webhook: ${{ secrets.SLACK_WEBHOOK_SC_GENERAL }} + webhook-type: incoming-webhook + payload: | + text: "Hey team, please update your scripts/config.sh file (see config.example.sh for latest changes)"