Slack Invite Checker #1869
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Slack Invite Checker | |
on: | |
schedule: | |
- cron: '0 */6 * * *' | |
workflow_dispatch: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if the invite link is valid | |
run: | | |
! grep --only-matching --extended-regexp '("|")isSharedInviteError("|")\s*:\s*true' <(curl --silent --location --user-agent Chrome/65536.0.0.0 https://www.helpfulengineering.org/slack) | |
- name: Slack Notification | |
uses: rtCamp/[email protected] | |
env: | |
SLACK_CHANNEL: devops | |
SLACK_COLOR: warning | |
SLACK_ICON: ':warning:' | |
SLACK_MESSAGE: | | |
Our <https://www.helpfulengineering.org/slack|public invite link> is down and needs to be manually updated: | |
1. <https://slack.com/intl/en-es/help/articles/201330256-Invite-new-members-to-your-workspace#share-an-invite-link|Generate a new link> without expiry date; you may need to deactivate the previous one first. Don’t forget to configure your invite link so it does not send [you] a message whenever a new user joins. | |
2. Update the permanent redirect link <https://www.helpfulengineering.org/wp-admin/options-general.php?page=eps_redirects|on the administration dashboard> by using <https://start.1password.com/open/i?a=J3YBD4VIJZGH3ORXYSVY6UUFXY&h=helpfulengineering.1password.com&i=5vsbwaf2gk6n7ffyp6ycv3alhe&v=g26sfhnu37jcyc3lbwkbbzlr6i|these credentials> and then click the `[refresh cache]` button. | |
:robot_face: Carbon copy to <@U0103B34HGR> | |
SLACK_FOOTER: | | |
<https://github.com/helpfulengineering/tool-slack-automation/blob/master/.github/workflows/invite-check.yml|Click this text if you want to change the bot behavior.> | |
SLACK_TITLE: Slack invite link is down | |
SLACK_USERNAME: Invite link checker | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
MSG_MINIMAL: true | |
if: ${{ failure() }} | |