mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #550] Issue: Can't use action from repo checked out with actions/checkout #372
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#372
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 @kylegibson-rldatix on GitHub (Mar 3, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/550
Act version
Expected behaviour
Expected to be able to locally test a github action workflow that checks out a repo containing another action, and then executes that action in the runner env with
usesActual behaviour
actfails with error messageError: open /home/*****/gh-action-test-repo/example/action.yaml: no such file or directoryWhile the repo is sucessfully checked out to the runner env, it appears that
actdoes not look within the runner env when evaluating localuses.Workflow and/or repository
foo/exampleis not a real repository.workflow
Steps to reproduce
actoutputI've scrubbed sensitive information from the log below.
Log
@dannystaple commented on GitHub (Mar 5, 2021):
This limits being able to do the workaround in https://github.community/t/github-action-action-in-private-repository/16063/15.
@mikemonkers commented on GitHub (Mar 5, 2021):
I also see this issue as described above. It certainly makes testing composite actions in a separate repo seemingly impossible.
@jsoref commented on GitHub (Apr 4, 2021):
For reference, this has nothing to do with checkouts per se. And nothing to do with private repositories.
https://github.com/jsoref/nektos-act-issues-550/runs/2263398812?check_suite_focus=true
Fwiw, the reason I'm using curl instead of checkout here is that I don't seem to have a token that makes github's checkout action happy. But, it does conveniently show that the problem isn't relating to checking out :-).
The problem is that the code that looks for action.yml/action.yaml isn't looking inside the container:
github.com/nektos/act@b9a7bc6202/pkg/runner/step_context.go (L309-L311)Generally fixing things in act isn't particularly hard, so if someone wants to give it a try, they're welcome to.
This isn't a problem I'm hitting, so it isn't high on my list (I'm not a member of act fwiw, I'm just trying to clean things up for some of my own workflows).
@metamoof commented on GitHub (Apr 5, 2021):
I'm also seeing this, both in ubuntu and windows
@github-actions[bot] commented on GitHub (May 6, 2021):
Issue is stale and will be closed in 14 days unless there is new activity
@dannystaple commented on GitHub (May 10, 2021):
This doesn't appear to be fixed yet.
@jsoref commented on GitHub (May 10, 2021):
What version of act are you using? (Please always include that detail, and preferably a workflow reference)
(I'm not saying it is/isn't, it's just helpful to be able to check/compare.)
@MK-Draft-f0 commented on GitHub (Jun 2, 2021):
Bump!! I get this issue too, tried to symlink (ln -s ./action.yml action.yaml) the file and still get same error!
⭐ Run Terraform Setup
❌ Failure - Terraform Setup
Error: open C:\Users\redacted\Desktop\repos\redacted.actions\github-action-setup-terraform\action.yaml: The system cannot find the path specified.
Version is @latest currently @v0.2.22
@jsoref commented on GitHub (Jun 2, 2021):
@fdxmk
@MK-Draft-f0 commented on GitHub (Jun 2, 2021):
Tried v0.2.22-18 seen somewhere (issue 567) .20 did not have issue but not true for this issue, on windows x64
jist of it is
@MK-Draft-f0 commented on GitHub (Jun 2, 2021):
tried snapshot 680, 702, 712 issue persists on those too
@MK-Draft-f0 commented on GitHub (Jun 2, 2021):
Also tried .22 & .20 on linux x64 chromebook, same issue!
@MK-Draft-f0 commented on GitHub (Jun 3, 2021):
If I switch the uses to a remote location it works fine, however I cannot do that in my environment, have to use a local, so how do I work around this in the interim??
@jsoref commented on GitHub (Jun 3, 2021):
If you're desperate you could probably use inception (i.e. run act inside act). Or just commit the action into your repository.
My guess is that the
uses:parser is looking for stuff from the outside / in a cache directory instead of in the workspace directory. But I don't have the energy to check right now (I'm currently working on my own action).@github-actions[bot] commented on GitHub (Jul 4, 2021):
Issue is stale and will be closed in 14 days unless there is new activity