Skip to content

Commit c88eebd

Browse files
Updated CI to skip HF login if token not provided (#280)
* Updated CI to skip HF login if token not provided * Update sanity-check-demos.yml
1 parent 2a35aaa commit c88eebd

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/sanity-check-demos.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ jobs:
6464
- name: Login to HF
6565
shell: bash
6666
run: |
67-
huggingface-cli login --token ${{ secrets.HF_TOKEN }}
67+
if [ -n "${{ secrets.HF_TOKEN }}" ]; then
68+
huggingface-cli login --token ${{ secrets.HF_TOKEN }}
69+
else
70+
echo "HF_TOKEN not set, continuing without login."
71+
fi
6872
- uses: ./.github/reusable-steps/gradio-action
6973
with:
7074
script: main.py

.github/workflows/sanity-check-kits.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ jobs:
6565
- name: Login to HF
6666
shell: bash
6767
run: |
68-
huggingface-cli login --token ${{ secrets.HF_TOKEN }}
68+
if [ -n "${{ secrets.HF_TOKEN }}" ]; then
69+
huggingface-cli login --token ${{ secrets.HF_TOKEN }}
70+
else
71+
echo "HF_TOKEN not set, continuing without login."
72+
fi
6973
- name: Check if test file exists
7074
id: determine-script
7175
shell: bash

0 commit comments

Comments
 (0)