mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #1291] failing to run K3s action, file not found #700
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#700
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 @sgandon on GitHub (Aug 5, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1291
Bug report info
Command used with act
Describe issue
fails to run the k3s action that is supposed to be spawning a light K8s cluster
Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
when I look into my local machine filesystem I find the file
/tmp/output/kubeconfig-latest.yaml, it does exists but I guess it is probably not in the act container and that may be the failing part ?Is there a way to specify mounted volumes on the act container ?
@ChristopherHX commented on GitHub (Aug 5, 2022):
Your problem is you get docker in docker, but expecting docker inside a VM.
You can, but that not enough to solve your problem
See here https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes, you can use the docker image name you use for ubuntu-latest in act.
The next problem is that you cannot reach localhost:8080 from the container.
Finally you probably want to throw away the idea of running all steps in docker, see https://github.com/nektos/act/pull/1293#issue-1330191414. Then act could run all commands directly on your system, see https://github.com/nektos/act/actions/runs/2806014990 for a experimental prebuild.
@sgandon commented on GitHub (Aug 10, 2022):
thanks a lot for your answer.
I have tried to use the native version of act but run into a few problems that I manage to fix by fideling with environment variables mostly.
About docker-in-docker this seems to be something that could be implemented in act I suppose, could'nt it ?
I fact we are using self hosted runners on Kubernetes and we have docker-in-dcoker enabled runners which make the k3s action work like a charm.
Do you think we should create an issue for this feature or maybe there is already one ?
@ChristopherHX commented on GitHub (Aug 10, 2022):
Ok I misunderstood, docker-in-docker means running a nested docker daemon inside a container. Act only offers a bind mount of the host docker socket, which causes this problem. E.g. act is just doing
docker run -v /var/run/docker.sock:/var/run/docker.sock, which leads to your problem.Feel free to create a feature request for Docker-in-Docker, but this also requires custom docker images including the dind patch like docker:dind.
With the experimental non docker act, you may or may not archive this like,
If you have access to the container images you use on kubernetes with self-hosted runners, you can also run the native version of act manually inside of the container if you know how to start the container without Kubernetes.
@github-actions[bot] commented on GitHub (Sep 10, 2022):
Issue is stale and will be closed in 14 days unless there is new activity
interface{}instead ofmap[string]...#1569