Skip to content

Commit

Permalink
Create github action for downloading files from s3
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleDolezal committed Dec 3, 2023
1 parent a8735e1 commit 06878cd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
13 changes: 13 additions & 0 deletions .github/actions/download-from-s3/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: download-from-s3
description: "Downloads files from s3"
inputs:
file-path:
description: "Path to test script"
required: true
runs:
using: macos-latest
steps:
- uses: actions/checkout@v3
- run: |
wget https://chn-ghost-buses-public.s3.us-east-2.amazonaws.com/frontend_data_files/${{inputs.file-path}} \
-O src/Routes/${{inputs.file-path}}
15 changes: 8 additions & 7 deletions .github/workflows/download-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ jobs:
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 \
-O src/Routes/data.json
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
- name: download data
uses: ./.github/actions/download-from-s3
with:
file-path: data.json
- name: download schedule vs realtime
uses: ./.github/actions/download-from-s3
with:
file-path: schedule_vs_realtime_all_day_types_routes.json
- run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
Expand Down

0 comments on commit 06878cd

Please sign in to comment.