Skip to content

Commit

Permalink
Download data from s3
Browse files Browse the repository at this point in the history
  • Loading branch information
dcjohnson24 committed Oct 25, 2023
1 parent 386d7f5 commit 42739c0
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/download-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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:
- github-action


jobs:
download-data-json:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- run: |
wget https://chn-ghost-buses-public.s3.us-east-2.amazonaws.com/frontend_data_files/data.json \
-P src/Routes/
wget \
https://chn-ghost-buses-public.s3.us-east-2.amazonaws.com/frontend_data_files/schedule_vs_realtime_all_day_types_routes.json \
-P src/Routes/
commit-changes:
needs: download-data-json
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
# Change the branch to main when ready to merge to main.
- run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git diff-index --quiet HEAD || git commit -m "{commit message}" -a
git push origin github-action:github-action



0 comments on commit 42739c0

Please sign in to comment.