Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
37 changes: 37 additions & 0 deletions .github/workflows/retrieve_data_dictionary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Retrieve HBCD Data Dictionary

on:
schedule:
- cron: '0 0 * * 1' # Runs every Monday at midnight UTC
workflow_dispatch: # Allows manual triggering

jobs:
retrieve-data:
runs-on: ubuntu-latest
steps:
- name: Check out 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 requests

- name: Run script
env:
HBCD_USERNAME: ${{ secrets.HBCD_USERNAME }}
HBCD_PASSWORD: ${{ secrets.HBCD_PASSWORD }}
run: python scripts/retrieve_script.py # Replace your_script_name.py with the actual name of your script

- name: Commit and push if changed
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add data_dictionaries/hbcd_data_dictionary_*.csv
# Commit only if there are changes
git diff --staged --quiet || git commit -m "Update HBCD data dictionary"
# Push only if there was a commit
git push || echo "No changes to push"
Loading