Closed itaysk closed 2 years ago
Not a clue sorry - I tried snap on a VM and is seems to work.
There is an official github action you can use: https://github.com/marketplace/actions/yq-portable-yaml-processor.
Alternatively, you could also download the binary using wget or something from the releases...
thanks
I noticed the same thing. Snap release was updated on April 18 which is when it stopped working. Still trying to figure out whether it's Snap or yq packaging issue.
thanks for reporting @pranas , let me know if I should reopen this issue or not
@mikefarah I just want to point out that the yq GH action does't work as well. Here's a minimal failing pipeline, am I doing something wrong?:
name: test
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: yq
uses: mikefarah/yq@3.3.0
- name: test
run: yq --version
it seems that the gh action is using docker so yq won't be available outside the step. still trying to make the original use case (snap install) work.
We switched to installing binaries from GitHub Releases:
- name: Install yq
run: |
sudo wget -O /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64
sudo chmod +x /usr/local/bin/yq
@pranas I was about to do the same thing, thanks for confirming!
Yeah not sure what's going on with snap - downloading the binary direct makes sense to me...
FYI, brew
seems to work still (Homebrew for Linux is installed on ubuntu-latest
):
- name: install tooling
run: |
brew install yq
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:
- name: Apply YQ
uses: mikefarah/yq@3.4.0
with:
cmd: |
cd ./somedir
yq w -i ${HELM_VALUES_FILE} flask.image.tag ${{ needs.set-data.outputs.version }}
yq w -i ${HELM_VALUES_FILE} nginx.image.tag ${{ needs.set-data.outputs.version }}
So is only the binary what is supported in real github action use cases?
Hmm seems so - I have to confess, I've never used github actions IRL. When I added the github action it was based on what I read and what some yq users were asking.
If there's a better way to publish the action I'm open to suggestions. Otherwise, as there are compiled, dependency free binaries, I don't see why you wouldn't just wget the binary and go with that?
If there's a better way to publish the action I'm open to suggestions. Otherwise, as there are compiled, dependency free binaries, I don't see why you wouldn't just wget the binary and go with that?
@mikefarah, I understand that a one-liner like the one suggested by @pranas is an option to run yq
in 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 yq
without having to wget
it manually.
Thanks!
I just found yq and the Github Action and can confirm that even in the latest release (3.4.1) I still get the yq: command not found
error. I'll try the workarounds listed above.
snap is beyond horrible. I'm switching all my Linux machines to Arch because of snap. Ubuntu can keep it.
Closing due to inactivity
sudo snap install yq
yq: command not found
)sudo snap install yq && yq --version
$ 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