Skip to content

Periodic Pipeline

Periodic Pipeline #5

Workflow file for this run

name: Periodic Pipeline
on:
schedule:
- cron: '*/5 * * * *' # Run every hour
env:
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY}}
SHEET_ID: ${{ secrets.SHEET_ID }}
jobs:
generate-json:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install Dependencies
run: |
pip install gspread oauth2client numpy pandas
- name: Run Python Script
run: python asylex_automation.py
- name: Commit and Push Changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add data/final_json.json
git commit -m "Update data"
if [[ `git status --porcelain` ]]; then
git push origin main
else
echo "WARNING: No changes detected"
fi
env:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}