mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-02 18:50:17 -05:00
fix(ci): use head_ref for PR branch in fresh install test
On PR events, github.ref_name resolves to the merge ref (e.g. "1159/merge") which doesn't exist on raw.githubusercontent.com, causing a 404. Use github.head_ref (the actual source branch) for PRs, falling back to ref_name for push events. Also adds -f flag to curl so HTTP errors fail immediately with a clear message instead of silently saving the 404 HTML page.
This commit is contained in:
6
.github/workflows/tinytorch-validate-dev.yml
vendored
6
.github/workflows/tinytorch-validate-dev.yml
vendored
@@ -436,7 +436,11 @@ jobs:
|
||||
- name: Run Fresh Install Test (Docker)
|
||||
run: |
|
||||
chmod +x tinytorch/scripts/test-fresh-install.sh
|
||||
./tinytorch/scripts/test-fresh-install.sh --branch ${{ github.ref_name }}
|
||||
# For PRs, github.ref_name is the merge ref (e.g. "1159/merge") which doesn't
|
||||
# exist as a real branch on raw.githubusercontent.com. Use head_ref (the actual
|
||||
# source branch) for PRs, falling back to ref_name for push events.
|
||||
BRANCH="${{ github.head_ref || github.ref_name }}"
|
||||
./tinytorch/scripts/test-fresh-install.sh --branch "$BRANCH"
|
||||
|
||||
# ===========================================================================
|
||||
# STAGE 7: USER JOURNEY - Destructive full journey (after all stages)
|
||||
|
||||
Reference in New Issue
Block a user