diff --git a/.github/workflows/trunk.yml b/.github/workflows/trunk.yml index f144edc8a1f..1d82a166ced 100644 --- a/.github/workflows/trunk.yml +++ b/.github/workflows/trunk.yml @@ -392,6 +392,10 @@ jobs: echo "::endgroup::" echo "::group::Set up HuggingFace Dependencies" + if [ -z "$SECRET_EXECUTORCH_HF_TOKEN" ]; then + echo "::error::SECRET_EXECUTORCH_HF_TOKEN is empty. For security reason secrets won't be accessible on forked PRs. Please make sure you submit a non-forked PR." + exit 1 + fi pip install -U "huggingface_hub[cli]" huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN pip install accelerate sentencepiece