π Review Documentation Bot #15
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: π Review Documentation Bot | |
on: | |
workflow_dispatch: | |
inputs: | |
dryRun: | |
description: 'Run the bot without sending notifications' | |
required: false | |
default: 'false' | |
schedule: | |
- cron: '0 8 * * 1' | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
DRY_RUN: false | |
jobs: | |
review-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run Documentation Review Bot in dry run mode | |
if: github.event_name == 'workflow_dispatch' && github.event.inputs.dryRun == 'true' | |
env: | |
DRY_RUN: true | |
run: | | |
python bin/check-review-dates.py | |
- name: Run Documentation Review Bot in normal mode | |
if: github.event_name != 'workflow_dispatch' || github.event.inputs.dryRun != 'true' | |
run: | | |
python bin/check-review-dates.py |