jaxxstorm / action-install-gh-release

GitHub Action to install the Github Release binaries
Apache License 2.0
67 stars 29 forks source link

Auto-detection of ARM runner fails #61

Closed wearebasti closed 1 year ago

wearebasti commented 1 year ago

We tried running a couple of our jobs on the ARM instances of buildjet, everything works fine on the x64 based ones.

We use the auto-detect feature in this action, but it stops after detecting the OS:

Run jaxxstorm/action-install-gh-release@v1.10.0
  with:
    repo: cloudflare/cloudflared
    extension-matching: disable
    rename-to: cloudflared
    chmod: 755
    token: ***
    tag: latest
  env:
    AWS_DEFAULT_REGION: eu-central-1
    AWS_REGION: eu-central-1
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
    AWS_SESSION_TOKEN: ***
==> System reported platform: linux
==> Using platform: linux

So in the next step(s) we are faced with a /home/runner/actions-runner/_work/_temp/485aef00-6518-476f-858a-831665b49bc3.sh: line 14: cloudflared: command not found

We were trying to run on the actions-runner image buildjet-2vcpu-ubuntu-2204-arm. It works fine on the non-arm based buildjet-2vcpu-ubuntu-2204

Is there something we're missing to have the detection work on ARM as well?

jaxxstorm commented 1 year ago

The action uses the arch detection from the standard os package in nodejs:

https://github.com/jaxxstorm/action-install-gh-release/blob/02d01a6573b4f9109959f135e38c65423b697fc2/src/main.ts#L1 https://github.com/jaxxstorm/action-install-gh-release/blob/02d01a6573b4f9109959f135e38c65423b697fc2/src/main.ts#L89

If the detection is failing on buildjet, it's an issue with node os module. I'd start with just running os.arch() and go from there.

If the os.arch() works outside this action, please let me know