Skip to content

GITHUB_BASE_REF isn't set if it's not a PR #424

Description

@henryiii

The builds on develop show a red x, and it's because the GITHUB_BASE_REF variable is used there, and that' snot set (see https://docs.github.com/en/actions/reference/workflows-and-actions/variables#default-environment-variables). That causes the line

git clone -b $GITHUB_BASE_REF --depth 5 https://github.com/boostorg/boost.git

To evaluate to

git clone -b --depth 5 https://github.com/boostorg/boost.git

Which means -b eats --depth and the error is that 5 is not a repository:

https://github.com/boostorg/histogram/actions/runs/23616890771/job/68786564822

The variable should be surrounded by quotes, and it should not try to use GITHUB_BASE_REF on a branch build, only on a PR. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions