From f7e59c686839383caa67be4f129b25c15bb73eaf Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 23 Jul 2026 10:19:25 -0400 Subject: [PATCH] ci: quote GITHUB_BASE_REF and fall back to GITHUB_REF_NAME on branch builds GITHUB_BASE_REF is only set for pull_request events, so push builds cloned the superproject with an empty branch name and -b ate --depth. Fixes #424 Assisted-by: ClaudeCode:claude-opus-4.8 --- .github/workflows/cov.yml | 2 +- .github/workflows/doc.yml | 2 +- .github/workflows/slow.yml | 6 +++--- .github/workflows/superproject_cmake.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cov.yml b/.github/workflows/cov.yml index 4eee0536..2dd46003 100644 --- a/.github/workflows/cov.yml +++ b/.github/workflows/cov.yml @@ -29,7 +29,7 @@ jobs: - name: Fetch Boost superproject run: | cd .. - git clone -b $GITHUB_BASE_REF --depth 5 https://github.com/boostorg/boost.git + git clone -b "${GITHUB_BASE_REF:-$GITHUB_REF_NAME}" --depth 5 https://github.com/boostorg/boost.git cd boost mv -f $GITHUB_WORKSPACE/* libs/histogram git submodule update --init --depth 5 tools/build tools/boostdep diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 092175b4..2ded1bca 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -41,7 +41,7 @@ jobs: - name: Fetch Boost superproject run: | cd .. - git clone -b $GITHUB_BASE_REF --depth 5 https://github.com/boostorg/boost.git + git clone -b "${GITHUB_BASE_REF:-$GITHUB_REF_NAME}" --depth 5 https://github.com/boostorg/boost.git cd boost mv -f $GITHUB_WORKSPACE/* libs/histogram git submodule update --init --depth 5 tools/build tools/boostdep tools/quickbook tools/boostbook diff --git a/.github/workflows/slow.yml b/.github/workflows/slow.yml index 93f9cdfa..f472f372 100644 --- a/.github/workflows/slow.yml +++ b/.github/workflows/slow.yml @@ -31,7 +31,7 @@ jobs: - name: Fetch Boost superproject run: | cd .. - git clone -b $GITHUB_BASE_REF --depth 5 https://github.com/boostorg/boost.git + git clone -b "${GITHUB_BASE_REF:-$GITHUB_REF_NAME}" --depth 5 https://github.com/boostorg/boost.git cd boost mv -f $GITHUB_WORKSPACE/* libs/histogram git submodule update --init --depth 5 tools/build tools/boostdep @@ -55,7 +55,7 @@ jobs: - name: Fetch Boost superproject run: | cd .. - git clone -b $GITHUB_BASE_REF --depth 5 https://github.com/boostorg/boost.git + git clone -b "${GITHUB_BASE_REF:-$GITHUB_REF_NAME}" --depth 5 https://github.com/boostorg/boost.git cd boost mv -f $GITHUB_WORKSPACE/* libs/histogram git submodule update --init --depth 5 tools/build tools/boostdep @@ -76,7 +76,7 @@ jobs: - name: Fetch Boost superproject run: | cd .. - git clone -b $GITHUB_BASE_REF --depth 5 https://github.com/boostorg/boost.git + git clone -b "${GITHUB_BASE_REF:-$GITHUB_REF_NAME}" --depth 5 https://github.com/boostorg/boost.git cd boost mv -f $GITHUB_WORKSPACE/* libs/histogram git submodule update --init --depth 5 tools/build tools/boostdep diff --git a/.github/workflows/superproject_cmake.yml b/.github/workflows/superproject_cmake.yml index 6651fb55..3f212e92 100644 --- a/.github/workflows/superproject_cmake.yml +++ b/.github/workflows/superproject_cmake.yml @@ -18,7 +18,7 @@ jobs: - name: Fetch Boost superproject run: | cd .. - git clone -b $GITHUB_BASE_REF --depth 5 https://github.com/boostorg/boost.git + git clone -b "${GITHUB_BASE_REF:-$GITHUB_REF_NAME}" --depth 5 https://github.com/boostorg/boost.git cd boost git submodule update --init --depth 5 rm -rf libs/histogram/*