Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce of empty array #31

Open
immesys opened this issue Nov 7, 2023 · 0 comments
Open

Reduce of empty array #31

immesys opened this issue Nov 7, 2023 · 0 comments

Comments

@immesys
Copy link

immesys commented Nov 7, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant