-
Notifications
You must be signed in to change notification settings - Fork 86
48 lines (39 loc) · 1.31 KB
/
post-activities-updates.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
on:
workflow_call:
inputs:
LEADERBOARD_URL:
type: string
required: true
description: URL to the Leaderboard Deployment (to access the EOD API's)
secrets:
GITHUB_TOKEN:
required: true
LEADERBOARD_API_KEY:
required: true
SLACK_EOD_BOT_CHANNEL:
required: true
SLACK_EOD_BOT_TOKEN:
required: true
jobs:
main:
name: Fetch activity from GitHub and call Slack Webhook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # This pulls the caller workflow's repo (eg: coronasafe/leaderboard-data)
- uses: actions/checkout@v4
with:
repository: coronasafe/leaderboard
path: ./leaderboard
sparse-checkout: activities-bot
- uses: actions/setup-node@v4
with:
node-version: 21.x
- run: npm install @octokit/action gray-matter
- run: node scripts/slackEODReminder.js
env:
GITHUB_ORG: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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 }}