Skip to content

Intermittent failures trying to get URL asset URL #5

@beppler

Description

@beppler

Most of the time the action works, but sometimes we receive the following error during the workflow execution:

jq: error (at <stdin>:1): Cannot index string with string "tag_name"

It appears to happen on this line of the script:

  asset_url=$(
      curl -s https://api.github.com/repos/peak/s5cmd/releases |
          jq --arg tag "${tag}" --arg asset_name "${asset_name}" '.[]| select(.tag_name==$tag) | .assets[].browser_download_url | select(. | test(".+" + $asset_name + "$"))' | xargs
  )

It appears that the releases endpoint responded with a invalid json, but I can't confirm it.

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