yq
yq copied to clipboard
Github actions attempts to build docker container every time
If a user attempts to use the yq@v4 github actions like so:
- name: Show inspec failures report
uses: mikefarah/yq@v4
with:
cmd: yq .error foobar.yaml
They will get a pipeline failure
Build container for action use: '/data/_work/_actions/mikefarah/yq/v4/github-action/Dockerfile'.
Error: docker: command not found
Desired result
The github action should not attempt to rebuild a container every time the pipeliene runs. The docker container should be provided for the end user. Users should not be expected to setup docker-in-docker to use a github action
Theory
I believe the problem lies in 2 two lines.
https://github.com/mikefarah/yq/blob/master/action.yml#L14-L15
Instead of referencing a pre-build image, it is using docker:// to build the docker image locally.
For contrast, here is a project that uses a CLI similar to yq
and does it without needing to rebuild the container every time
https://github.com/mikefarah/yq/blob/master/action.yml#L14-L15
Related
https://github.com/mikefarah/yq/issues/1283
Note:
Even trying to use @v4.33.1
instead of @4
results in the same behavior
![Screenshot 2023-03-28 at 12 08 56 PM](https://user-images.githubusercontent.com/109251274/228329277-a59c4c65-d583-4384-9c61-989dd0809fce.png)
Dang I thought I fixed that.
@spencer-cdw the link you have for the project without need to build is the wrong one - do you have an example? Or better yet a PR?