dashboard-update #1619
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |