Skip to content

Update addbook.txt

Update addbook.txt #33

Workflow file for this run

name: sqlupdate
on:
push:
branches:
- updatesql
paths:
- Database/Register/datum/addbook.txt
jobs:
update-db:
runs-on: ubuntu-latest
steps:
# 1. Checkout the `updatesql` branch
- name: Checkout updatesql branch
uses: actions/checkout@v2
with:
ref: updatesql
fetch-depth: 0
# 2. Set up Python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.12"
# 3. Install dependencies
- name: Install Python dependencies
run: |
pip install SQLAlchemy bs4 requests
# 4. Run the Python script
- name: Run Python program
run: |
python -m Database.Register.register_actions
# 5. Checkout the `release` branch
- name: Checkout release branch
run: |
git fetch origin release
git checkout release
# 6. Copy `Database/ompooscores.db` from `updatesql` branch
- name: Copy updated ompooscores.db from updatesql
run: |
git checkout updatesql -- Database/ompooscores.db
# 7. Commit and push changes to `release`
- name: Commit and push changes
run: |
git config --global user.name "${{ secrets.GITHUBNAME }}"
git config --global user.email "${{ secrets.EMAIL }}"
git add Database/ompooscores.db
git commit -m "Update ompooscores.db after Python script execution" || echo "No changes to commit"
git push origin release