Skip to content

Commit

Permalink
build: sync env
Browse files Browse the repository at this point in the history
  • Loading branch information
weaigc committed Sep 8, 2023
1 parent 2da30dd commit 96d6714
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
ENDPOINTS: ${{ vars.ENDPOINTS }}
run: cd sync && cat endpoint.txt && pip install huggingface_hub && python sync.py && cat endpoint.txt
run: cd sync && pip install huggingface_hub && python sync.py && cat endpoint.txt
- name: Save cache
id: file-save
uses: actions/cache/save@v3
Expand Down
2 changes: 1 addition & 1 deletion sync/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
try:
with open(file,"r") as f:
content=f.read().strip()
print('content:', content)
endpoint = endpoints[1] if content == endpoints[0] else endpoints[0]
f.close()
except IOError:
Expand All @@ -22,4 +23,3 @@

print('new endpoint', endpoint)
hf_api.add_space_secret('hf4all/bingo2', 'ENDPOINT', endpoint.strip())

0 comments on commit 96d6714

Please sign in to comment.