Update contact list #150
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 contact list | |
on: | |
#push: | |
# branches: | |
# - "main" | |
schedule: | |
- cron: 0 7 * * 1 # Every monday at 7 am | |
jobs: | |
run: | |
name: Job - Update contact list | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install -r requirements.txt | |
- name: Lint with black | |
run: | | |
black ./scripts/ | |
- name: Run crawlers | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
run: | | |
python3 ./scripts/ | |
- name: Verify Changed files | |
uses: tj-actions/verify-changed-files@v12 | |
id: verify-changed-files | |
with: | |
files: | | |
*.csv | |
- name: Commit contacts .csv | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
uses: EndBug/add-and-commit@v7 | |
with: | |
author_name: bot | |
author_email: noreply@actions.7onn.github.com | |
message: 'Update politicians contact list' | |
add: '*' |