Add return a value in main function #4
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: Automate ridership data updates | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- ridership-gh-action | |
schedule: | |
# Run every day at 12:30pm CST which is 5:30pm UTC | |
- cron: 30 17 * * * | |
env: | |
PYTHON_VERSION: 3.10.6 | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
jobs: | |
download-ridership-data: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Download and save ridership data to s3 | |
run: | | |
pip install -r requirements.txt | |
python -c 'from scrape_data.ridership_download import save_ridership_json; \ | |
save_ridership_json()' \ | |
$AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY |