Skip to content

(Optionally) Ref to a branch and if it doesn't exist, use default #512

Open
@obedparla

Description

@obedparla

Hey!

Is there a way to get a ref to work like an optional OR? For example:

// GITHUB_HEAD_REF being the name of the branch if my google-foo didn't fail me
ref: ${GITHUB_HEAD_REF} || master

My use-case: I have multiple repos that depend on each other sometimes. If they do, they all share the same branch name for a feature (e.g feature/add-tests). I want to pull the repos with those branches when they exist, but if they don't (as it's not always necessary to change code in all repos), it'll pull master.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions