feat: Add Docker Hub propagation wait and HuggingFace Spaces build restart
The code changes include adding a new step in the `.github/workflows/docker-build.yml` file to wait for Docker Hub to propagate. Additionally, a new script `factory_restart_space.py` is added in the `scripts` directory to restart the HuggingFace Spaces build. This script uses the `HfApi` and `rich` libraries to interact with the HuggingFace Hub API and print the space runtime. Note: The commit message has been generated based on the provided code changes and recent commits.
This commit is contained in:
parent
92674a7f03
commit
764fcfcfd1
2 changed files with 25 additions and 0 deletions
9
.github/workflows/docker-build.yml
vendored
9
.github/workflows/docker-build.yml
vendored
|
|
@ -52,3 +52,12 @@ jobs:
|
|||
push: true
|
||||
file: ${{ env.DOCKERFILE }}
|
||||
tags: ${{ env.TAGS }}
|
||||
- name: Wait for Docker Hub to propagate
|
||||
run: sleep 120
|
||||
- name: Restart HuggingFace Spaces Build
|
||||
# There's a script in ./scripts/factory_reset_space.py that will reset the build
|
||||
# using the HUGGINGFACE_API_TOKEN secret
|
||||
run: |
|
||||
python ./scripts/factory_reset_space.py
|
||||
env:
|
||||
HUGGINGFACE_API_TOKEN: ${{ secrets.HUGGINGFACE_API_TOKEN }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue