Skip to content

Scheduler Weekly

Scheduler Weekly #139

Workflow file for this run

name: Scheduler Weekly
# This workflow has two triggers:
# - weekly cron job on sunday morning
# - manual trigger from the github UI
on:
# cron runs weekly at 07:13 UTC time on every Sunday
# this coresponds to 03:13 NYC time
# because we want to hit the NYC OpenData server at low traffic times
schedule:
- cron: '13 7 * * SUN'
# manually trigger the workflow from the github UI
workflow_dispatch:
jobs:
Download-NYC-Crash-Data:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Show Python Version
run: python --version
- name: Install pip libraries
run: pip install --upgrade -r requirements-github-actions.txt
- name: Run python script to download latest CSV data from NYC Open Data and save as parquet file
run: python github_action.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_REF: ${{ github.ref }}
GITHUB_BRANCH: ${{ github.ref_name }}