mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #437] executable file not found after using hashicorp/setup-terraform@v1 #303
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#303
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cdhunt on GitHub (Dec 7, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/437
I've tried a number of different images (nektos/act-environments-ubuntu:18.04, node:12.6) and they all fail with
executable file not foundwhen usinghashicorp/setup-terraform@v1to install terraform binaries into the running container.| OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown@cdhunt commented on GitHub (Dec 7, 2020):
setup-terraform uses actions/tool-cache which puts the files into /tmp/{randomvalue} and adds it to the PATH, but PATH is not actually updated.
@benlemasurier commented on GitHub (Dec 14, 2020):
I also see this behavior while using
setup-go. Though, rather than a specific binary missing from$PATH, the entire$PATHappears to be clobbered:test.yamloutput:edit: in repsonse to @gdavison's comment below, this happens in both the default
ubuntu-latestimage andnektos/act-environments-ubuntu:18.04@gdavison commented on GitHub (Dec 14, 2020):
The
setup-terraformaction doesn't work in the default slim container. It needs the full Ubuntu image from https://hub.docker.com/r/nektos/act-environments-ubuntu/tagsWe use an
.actrcfile to always specify this, like at https://github.com/nektos/act#configuration@cdhunt commented on GitHub (Dec 15, 2020):
It didn't work for me in full Ubuntu. Can you share more details about which worked for you?
@gdavison commented on GitHub (Dec 15, 2020):
I missed a step. By default the action installs a wrapper that captures the
stdout,stderr, andexitcodeas outputs of the action. This interferes with some calls to theterraformexecutable.To skip installing the wrapper, you can configure the action with
It's not documented, but from the code it looks like when the wrapper is installed, you can call
terraform-binto get the actual Terraform executable.@edtan commented on GitHub (Jan 17, 2021):
It looks like this has now been fixed in
v0.2.18by #462, but you will need to use thenode:12.6image (since the defaultnode:12.6-buster-slimdoesn't haveunzipwhich hashicorp/setup-terraform@v1 needs).@cdhunt commented on GitHub (Jan 20, 2021):
@edtan Were you able to run any Terraform commands in a workflow?
It does appear the Path issue is resolved, now I'm getting a Permission denied error.
I don't know if that's caused by using node:12.6 or act, however, this issue can be closed.
@edtan commented on GitHub (Jan 20, 2021):
Yes, I am able to run
terraformcommands in a workflow. Runningterraform fmtinnode:12.6gives me:@cdhunt commented on GitHub (Jan 20, 2021):
Thanks, @edtan .
@cdhunt commented on GitHub (Jan 20, 2021):
Did you use
hashicorp/setup-terraform@v1or your own install logic?@edtan commented on GitHub (Jan 20, 2021):
Here's the workflow that I used:
and then I ran:
My system info is:
@K0rdan commented on GitHub (Jan 20, 2021):
Thanks to both of you, i was facing the same issue :)
@cdhunt commented on GitHub (Jan 20, 2021):
I confirmed it works from Docker on Linux, but not Docker on Windows.
I'll open a new issue.