Skip to content

Reduce of empty array #31

@immesys

Description

@immesys

When trying to use the earthly install github action, we are getting this error:

Run earthly/actions-setup@v1
  with:
    version: latest
    prerelease: false
    use-cache: true
  env:
    LOG_TYPE: PLAIN
Configured range: latest; allow prerelease: false
Error: Reduce of empty array with no initial value

Our github actions yaml contains this:

steps:
      - name: Checkout Code
        uses: actions/checkout@v4
      - name: Configure Git Branch for Earthly
        run: |
          branch=""
          if [ -n "$GITHUB_HEAD_REF" ]; then
            branch="$GITHUB_HEAD_REF"
          else
            branch="${GITHUB_REF##*/}"
          fi
          git checkout -b "$branch" || true
      - name: Install Earthly
        uses: earthly/actions-setup@v1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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