jaxxstorm / action-install-gh-release

GitHub Action to install the Github Release binaries
Apache License 2.0
75 stars 32 forks source link

binaries-location not working as expected #64

Closed danhngo-lx closed 10 months ago

danhngo-lx commented 1 year ago

I use this to install promtool:

      - name: Install promtool
        uses: jaxxstorm/action-install-gh-release@v1.10.0
        with:
          repo: prometheus/prometheus
          tag: 'v2.37.9'
          platform: linux
          arch: amd64
          cache: enable
          binaries-location: prometheus-2.37.9.linux-amd64

However when using promtool, the command is not found. I tried to echo $PATH and could see:

/opt/hostedtoolcache/prometheus/prometheus/v2.37.9/linux-amd64:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin

I think the path for prometheus should be /opt/hostedtoolcache/prometheus/prometheus/v2.37.9/linux-amd64/prometheus-2.37.9.linux-amd64 instead of /opt/hostedtoolcache/prometheus/prometheus/v2.37.9/linux-amd64? 🤔

I'm using github runner self-hosted by the way.

jaxxstorm commented 1 year ago

When you extract the archive, how does the result directory structure look?

danhngo-lx commented 1 year ago

The directory looks like this:

prometheus-2.37.9.linux-amd64
├── LICENSE
├── NOTICE
├── console_libraries
│   ├── menu.lib
│   └── prom.lib
├── consoles
│   ├── index.html.example
│   ├── node-cpu.html
│   ├── node-disk.html
│   ├── node-overview.html
│   ├── node.html
│   ├── prometheus-overview.html
│   └── prometheus.html
├── prometheus
├── prometheus.yml
└── promtool

3 directories, 14 files
jaxxstorm commented 10 months ago

I was unable to reproduce this on a github hosted runner, so i suspect the issue is related to your self-hosted runner. Considering this closed, as unable to reproduce with a test