Skip to content

Testing slack scheduling #1

Testing slack scheduling

Testing slack scheduling #1

Workflow file for this run

name: Test Slack message
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
slack-scheduler:
runs-on: ubuntu-latest
steps:
- name: Send scheduled Slack message
env:
SLACK_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
CHANNEL_ID: C09GKJQP1BM
run: |
POST_AT=$(($(date +%s) + 86400)) # 24 hours from now
POST_AT=$(($(date +%s) + 1)) # 24 hours from now
DATA=$(jq --arg channel "CHANNEL_ID" --arg postat "$POST_AT" '.channel = $channel | .postat = $postat' .github/config/appstore-slack.json)
curl -X POST https://slack.com/api/chat.scheduleMessage \
-H "Authorization: Bearer $SLACK_TOKEN" \
-H "Content-Type: application/json" \
-d $DATA