slackbot r+d checkin #105
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: slackbot r+d checkin | |
on: | |
schedule: | |
# run on Fridays at 9:15am (earlier due to possible delay in running) | |
# - cron: "15 13 * * FRI" # standard time | |
- cron: "15 14 * * FRI" # daylight savings | |
env: | |
MSG_FILENAME: ".github/slackbot_text/rd_checkin.txt" | |
jobs: | |
slackbot: | |
name: slackbot message | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Select random message from file | |
id: select_message | |
run: echo "random_message=$(shuf -n 1 $MSG_FILENAME)" >> $GITHUB_OUTPUT | |
- name: Send message to Slack | |
id: slack | |
uses: slackapi/[email protected] | |
with: | |
channel-id: "staff-r-and-d" | |
# post as a simple plain text message | |
slack-message: "${{ steps.select_message.outputs.random_message }}" | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.GHBOT_SLACK_BOT_TOKEN }} |