.github/workflows/get_ths_data.yml #139
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: Get THS Data | |
on: | |
schedule: | |
- cron: '0 5 * * TUE-SAT' | |
# watch: | |
# types: started | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run Python script | |
run: python scripts/get_ths_data.py | |
env: | |
BX_TOKEN: ${{ secrets.BX_TOKEN }} | |
SENDER_EMAIL: ${{ secrets.SenderEmail }} | |
SENDER_PASSWORD: ${{ secrets.SenderPassword }} | |
CF: ${{ secrets.CF }} | |
THS_USER: ${{ secrets.THS_USER }} | |
- name: Git commit and push | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
git pull | |
git add -A | |
git commit -m "👷ci: update data (automatically)" || exit 0 | |
git push |