forked from ohcnetwork/leaderboard
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.69 KB
/
remind-and-post-eod-updates-to-slack.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Sends reminders and Posts Contributor's EOD Updates to Slack
on:
workflow_call:
inputs:
LEADERBOARD_URL:
type: string
required: true
description: URL to the Leaderboard Deployment (to access the EOD API's)
secrets:
GITHUB_PAT:
required: true
LEADERBOARD_API_KEY:
required: true
SLACK_EOD_BOT_CHANNEL:
required: true
SLACK_EOD_BOT_TOKEN:
required: true
jobs:
main:
name: Remind, wait, and Post EOD updates of contributors to slack channel
runs-on: ubuntu-latest
env:
GITHUB_ORG: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_PAT }}
LEADERBOARD_URL: ${{ inputs.LEADERBOARD_URL }}
LEADERBOARD_API_KEY: ${{ secrets.LEADERBOARD_API_KEY }}
SLACK_EOD_BOT_CHANNEL: ${{ secrets.SLACK_EOD_BOT_CHANNEL }}
SLACK_EOD_BOT_TOKEN: ${{ secrets.SLACK_EOD_BOT_TOKEN }}
CONTRIBUTORS_DIR: "../../contributors"
steps:
- uses: actions/checkout@v4 # This pulls the caller workflow's repo (eg: ohcnetwork/leaderboard-data)
- uses: actions/checkout@v4
with:
repository: ohcnetwork/leaderboard
path: ./leaderboard
sparse-checkout: activities-bot
- uses: actions/setup-node@v4
with:
node-version: 21.x
- run: npm install --from-lockfile
working-directory: leaderboard/activities-bot
- name: Send reminders to eligible contributors
run: npm run remind
working-directory: leaderboard/activities-bot
- run: sleep 30m
- name: Post EOD Updates to Slack Channel
run: npm run post-updates
working-directory: leaderboard/activities-bot