There was an error while loading. Please reload this page.
1 parent f6a2df8 commit 21c51e8Copy full SHA for 21c51e8
1 file changed
.github/workflows/classroom.yml
@@ -186,8 +186,12 @@ jobs:
186
run: |
187
# Ensure full history
188
git fetch origin main
189
- git checkout "${GITHUB_REF##*/}"
190
- git branch --set-upstream-to=origin/main "${GITHUB_REF##*/}"
+
+ # Determine branch name safely
191
+ BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
192
+ echo "Using branch: $BRANCH_NAME"
193
+ git checkout "$BRANCH_NAME"
194
+ git branch --set-upstream-to=origin/main "$BRANCH_NAME"
195
196
# Check for test files
197
has_tests=$(find src/test/java -type f -name "*.java" | grep -q . && echo "true" || echo "false")
0 commit comments