Skip to content

Commit

Permalink
Fix load-data workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gadhagod committed Sep 4, 2023
1 parent c430b24 commit f3e1d77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/load-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install app requirements
run: pip install -r requirements.txt
- name: Load data
run: python3 scripts/load_data.py ${{ secrets.RS2_TOKEN }}
run: env RS2_TOKEN="${{ secrets.RS2_TOKEN }}" python3 scripts/load_data.py
- name: Start server
run: python3 server &
- name: Install test dependencies
Expand Down
3 changes: 1 addition & 2 deletions scripts/load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# creates db (if needed) and adds/updates data in the db
# see "self hosting" for information

from sys import argv
from os import getenv, getcwd, listdir, path
from requests import post, get
from json import dumps, loads
Expand All @@ -12,7 +11,7 @@

root_dir = getcwd()
base_url = f'https://{getenv("RS2_SERVER") or "api.rs2.usw2.rockset.com"}'
api_key = f'ApiKey {getenv("RS2_TOKEN") or argv[1]}'
api_key = f'ApiKey {getenv("RS2_TOKEN")}'

def get_files_in_dir(dir_path):
res = []
Expand Down

0 comments on commit f3e1d77

Please sign in to comment.