Skip to content

Update library.bib periodically #512

Update library.bib periodically

Update library.bib periodically #512

Workflow file for this run

name: Update library.bib periodically
on:
schedule:
# Runs every 2 hours
- cron: "0 */2 * * *"
workflow_dispatch: # Allow manual triggering of the workflow
inputs:
run_message:
description: "Message to log when running manually"
required: false
default: "Manual trigger initiated"
jobs:
run-script:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9 # Specify the Python version you need
# Step 3: Install Python dependencies
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Step 4: Configure Git
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Step 5: Run the script
- name: Run bash script with secrets
env: # Pass secrets as environment variables
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
run: |
./update_all_libs.sh $CLIENT_ID $CLIENT_SECRET $ACCESS_TOKEN $REFRESH_TOKEN