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

GitHub Actions kayak/ecspresso@v1 failed due to v1 missing in the released list URL #559

Open
seiichi1101 opened this issue May 9, 2023 · 2 comments

Comments

@seiichi1101
Copy link

I got errors like the below log.

According to the reference, the list release URL https://api.github.com/repos/kayac/ecspresso/releases returns the latest 30 releases as default.
However, v1 releases are not included in 30 outs, so pagination handling is required to fix it.

  • Workflow settings
...
      - uses: kayac/ecspresso@v1

      - name: ECS deploy
        run: ecspresso deploy --envfile=ecs/prd.env
...
  • Error Logs
Run kayac/ecspresso@v1

Run set -e
  set -e
  VERSION="latest"
  if [ "${VERSION}" = "latest" ]; then
    DOWNLOAD_URL=$(curl -sS https://api.github.com/repos/kayac/ecspresso/releases | jq -r '[.[]|select(.tag_name < "v1.99")|select(.prerelease == false)][0].assets[].browser_download_url|select(match("linux.amd64."))')
  else
    DOWNLOAD_URL=https://github.com/kayac/ecspresso/releases/download/${VERSION}/ecspresso_${VERSION:1}_linux_amd64.tar.gz
  fi
  cd /tmp
  curl -sfLO ${DOWNLOAD_URL}
  if [[ "${DOWNLOAD_URL}" =~ \.tar\.gz$ ]]; then
    FILENAME=$(basename $DOWNLOAD_URL .tar.gz)
    tar xzvf ${FILENAME}.tar.gz
    sudo install ecspresso /usr/local/bin/ecspresso
  elif [[ "${DOWNLOAD_URL}" =~ \.zip$ ]]; then
    FILENAME=$(basename $DOWNLOAD_URL .zip)
    unzip ${FILENAME}.zip
    sudo install ${FILENAME} /usr/local/bin/ecspresso
  fi
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}

...
jq: error (at <stdin>:8371): Cannot iterate over null (null)
Error: Process completed with exit code 5.
@fujiwara
Copy link
Contributor

@seiichi1101 Thank you for reporting!

At first, ecspresso v1 will not be released in the future. So I recommend using kayac/ecspresso@v2 with version specified. @v2 can install any released version, including v1.x.

Typically, I would recommend specifying the version number on the production environment. The latest version has problems in rare cases.

But I'll fix this problem.

fujiwara added a commit that referenced this issue May 10, 2023
temporary fix for #559
@fujiwara
Copy link
Contributor

I fixed this by 3a8cbcf, but it is a mitigation.

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

2 participants