Update Data #21
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 Data | |
on: | |
schedule: | |
- cron: '0 0 1 * *' | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
pip install -e . | |
pip install -r requirements.txt | |
- name: Run Jupyter notebooks | |
run: python ./NOTEBOOKS/runner.py | |
- name: Run pre-commit hooks | |
run: pre-commit run --all-files | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "Data update as on $(date +'%Y-%m-%d')" | |
committer: github-actions[bot] <github-actions[bot]@users.noreply.github.com> | |
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> | |
signoff: false | |
base: main | |
branch: data-update | |
delete-branch: true | |
title: "DATA UPDATE $(date +'%Y-%m-%d')" | |
labels: | | |
report | |
automated pr | |
assignees: ptprashanttripathi | |
reviewers: ptprashanttripathi | |
team-reviewers: | | |
developers | |
qa-team | |
draft: false | |
- name: Check outputs | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |