Pārlūkot izejas kodu

set default head ref

justheuristic 3 gadi atpakaļ
vecāks
revīzija
dd4f1554c6
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      .github/workflows/run-tests.yaml

+ 4 - 0
.github/workflows/run-tests.yaml

@@ -28,6 +28,10 @@ jobs:
           pip install -r requirements.txt
       - name: Delete previous model, if exists
         run: |
+          if [ -z "$GITHUB_HEAD_REF" ]
+          then
+            export GITHUB_HEAD_REF="main"
+          fi
           python -c "from huggingface_hub import delete_repo; delete_repo(token='$BLOOM_TESTING_WRITE_TOKEN', \
           name='test-bloomd-350m-$GITHUB_HEAD_REF', organization='bloom-testing')" || true
       - name: Convert model and push to hub