diff --git a/.github/workflows/download-data.yml b/.github/workflows/download-data.yml index 5e8bf1b1..a9c52593 100644 --- a/.github/workflows/download-data.yml +++ b/.github/workflows/download-data.yml @@ -1,12 +1,8 @@ name: download-data - on: - schedule: - # Run everyday at 2:00pm CST which is 7:00pm UTC - - cron: 0 19 * * * - - # Allows the workflow to be run manually from the Actions tab - workflow_dispatch: + push: + branches: + - test_commit_routes jobs: download-data-json: @@ -19,15 +15,10 @@ jobs: wget \ https://chn-ghost-buses-public.s3.us-east-2.amazonaws.com/frontend_data_files/schedule_vs_realtime_all_day_types_routes.json \ -O src/Routes/schedule_vs_realtime_all_day_types_routes.json - + + - uses: oleksiyrudenko/gha-git-credentials@v2-latest + with: + token: '${{ secrets.GITHUB_TOKEN }}' - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" git add . - git diff-index --quiet HEAD || git commit -m "update data.json and schedule_vs_realtime_all_day_types_routes.json" -a - git push origin main:main - - - - - \ No newline at end of file + git commit -m 'Add downloaded file' \ No newline at end of file