-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.53 KB
/
remind_meeting.yml
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
name: "Lab meeting reminder"
on:
workflow_dispatch:
schedule:
- cron: "10 10 * * 4"
jobs:
remind-meeting:
runs-on: ubuntu-20.04
env:
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@master
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
pkgload
httr
- name: Remind meeting
env:
SLACK_INCOMING_WEBHOOK_URL: ${{ secrets.EPIFORECASTS_WEBHOOK }}
GSHEET_ID: ${{ secrets.GSHEET_ID }}
ZOOM_ROOM: ${{ secrets.ZOOM_ROOM }}
run: |
pkgload::load_all(".")
googlesheets4::gs4_deauth()
this_week_plan <- get_meeting_info(Sys.getenv("GSHEET_ID"))
msg <- create_announcement_reminder(
assignee = this_week_plan[["Speaker"]],
random = this_week_plan[["Random"]],
chair = this_week_plan[["Chair"]],
notes = this_week_plan[["Notetaking"]],
topic = this_week_plan[["Topic"]],
zoom_link = Sys.getenv("ZOOM_ROOM"),
room = this_week_plan[["Room"]]
)
if (!is.null(msg)) {
req <- httr::POST(
url = Sys.getenv("SLACK_INCOMING_WEBHOOK_URL"),
body = list(text = msg, type = "mrkdwn"),
encode = "json"
)
httr::stop_for_status(req)
}
shell: Rscript {0}