-
Notifications
You must be signed in to change notification settings - Fork 103
60 lines (55 loc) · 2.13 KB
/
update_lag_status_dashboard.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
51
52
53
54
55
56
57
58
59
60
name: Update Status Dashboard
on:
# schedule:
# - cron: '30 3 * * *'
repository_dispatch:
types: [ dashboard-update ]
workflow_dispatch:
inputs:
sendReminderNotification:
description: 'Remind lagging modules with chat notification'
required: false
default: 'false'
jobs:
update-lag-status:
if: github.repository_owner == 'ballerina-platform'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Python Packages
run: |
pip install requests
pip install retry
pip install PyGithub
pip install matplotlib
pip install httplib2
pip install Image
pip install cryptography
- name: Update Status Dashboard
run: |
if ${IS_SCHEDULE_WORKFLOW} == true; then
echo "Schedule Workflow Triggered"
python dependabot/update_lag_status.py "true"
elif ${IS_REPOSITORY_DISPATCH} == true; then
echo "Repository Dispatch Workflow Triggered"
python dependabot/update_lag_status.py "${{ github.event.client_payload.sendNotification }}"
else
echo "Manual Trigger"
python dependabot/update_lag_status.py "${{ github.event.inputs.sendReminderNotification }}"
fi
env:
IS_SCHEDULE_WORKFLOW: ${{ github.event_name == 'schedule' }}
IS_REPOSITORY_DISPATCH: ${{ github.event_name == 'repository_dispatch' }}
BALLERINA_BOT_USERNAME: ${{ secrets.BALLERINA_BOT_USERNAME }}
BALLERINA_BOT_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }}
BALLERINA_BOT_EMAIL: ${{ secrets.BALLERINA_BOT_EMAIL }}
BALLERINA_REVIEWER_BOT_TOKEN: ${{ secrets.BALLERINA_REVIEWER_BOT_TOKEN }}
CHAT_ID: ${{ secrets.NOTIFICATIONS_CHAT_ID }}
CHAT_KEY: ${{ secrets.NOTIFICATIONS_CHAT_KEY }}
CHAT_TOKEN: ${{ secrets.NOTIFICATIONS_CHAT_TOKEN }}
ENV_USER_ENCRYPTION_KEY: ${{secrets.USER_ENCRYPTION_KEY}}