yq: yq not found, installed with snap in GH actions
- I have a GitHub actions workflow that uses yq
- it does
sudo snap install yq - It was working well, and recently starting to fail (a couple of weeks ago it was fine)
- it fails for not finding yq (
yq: command not found) - I even tried the following action which fails:
sudo snap install yq && yq --version - if I ssh into the worker to debug (using the tmate action), I can use yq. took this debugging info:
$ which yq
/snap/bin/yq
$ echo $PATH
/usr/share/rust/.cargo/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/runner/.dotnet/tools
This might be a Github Actions issue, or a snapcraft issue, but I thought to check here as well if you know about a change to yq (or it’s packaging) that might cause this.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (4 by maintainers)
Commits related to this issue
- ci: install yq manually (see https://github.com/mikefarah/yq/issues/418) — committed to greatislander/wecount.inclusivedesign.ca by greatislander 3 years ago
- ci: add GitHub action to ensure that the CMS branch is set properly (#492) * feat: add GitHub action to ensure that the CMS branch is set properly * ci: use first-party yq GitHub action * ci: i... — committed to inclusive-design/wecount.inclusivedesign.ca by greatislander 3 years ago
@mikefarah, I understand that a one-liner like the one suggested by @pranas is an option to run
yqin GitHub Actions. However, it is far more verbose compared to a simple- uses: mikefarah/yq@3.4.0, which is the common way to include third-party packages in your workflow.So it would be really great if there’d be an easy way to use
yqwithout having towgetit manually. Thanks!FYI,
brewseems to work still (Homebrew for Linux is installed onubuntu-latest):We switched to installing binaries from GitHub Releases:
snap is beyond horrible. I’m switching all my Linux machines to Arch because of snap. Ubuntu can keep it.
Hi,
brew is working but is kind of slow (circa 1min) and it cannot pin a specific version of
yq, which could break the pipelines. In comparison the yq action installs in seconds.I found that I cannot run multiline command in the current yq action. The following does not execute but returns a success:
So is only the binary what is supported in real github action use cases?