scrape and store data from cbv hourly #10349
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: scrape and store data from cbv hourly | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 */1 * * 1-5" | |
jobs: | |
scrape-data: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
cache: "pip" | |
- name: Install dependencies | |
working-directory: ./scraper | |
run: pip install -r requirements.txt | |
- name: Run scraper | |
working-directory: ./scraper | |
run: python3 src/main.py | |
- name: Commit and push | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
git diff --quiet && git diff --staged --quiet || git commit -am "[bot] update bcv rate" | |
git push origin master |