diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 303029d7d0620b6dd020670deb5aa6c69baacafe..2370f80dc8595d6828bb661edc6c4bc14322daf5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -159,7 +159,11 @@ trigger_inttest:
     ## Determine the juliainttest branch...
     # ... use an f-branch if posible...
     - if echo "$CI_COMMIT_REF_NAME" | grep -c "^f-" ; then
-        JULIAINT_REF=$CI_COMMIT_REF_NAME ;
+        if curl -o /dev/null -s -w "%{http_code}" $JULIAINTTEST_BRANCHES/$CI_COMMIT_REF_NAME | grep "404"; then
+          JULIAINT_REF=dev ;
+        else
+          JULIAINT_REF=$CI_COMMIT_REF_NAME;
+        fi
       fi;
     # ... or use main if possible...
     - if [[ "$CI_COMMIT_REF_NAME" == "main" ]] ; then