mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #185] local js action fails (uses: ./) #125
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#125
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 @helaili on GitHub (Apr 3, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/185
When developing a new JS action, I like to create a workflow within the same repo so I can test various use cases. In such a case, I reference the local action with
- uses: ./as defined in the documentationUnfortunately, it fails with the following error:
It does work if I move the action code in an
actionsubfolder and use it with- uses: ./action.This can be reproduced with the sample hello-world-javascript-action, you just need to add a basic workflow.
@rdlf0 commented on GitHub (May 10, 2020):
Hey, I had the same issue, but already posted my solution in #228. You need to provide the
pathparameter to theactions/checkoutaction in order to get the correct path when the code is copied to the container.@macdaddyaz commented on GitHub (Jun 23, 2020):
Sorry if this belongs in a new issue, but I'm experiencing a very similar problem in a similar situation. I'll be glad to open a new issue, if that would be better....
It looks like
actis not resolving relative paths within local actions the same way that GitHub Actions does.For instance, I have a workflow referencing a local action....
And my action.yml file in that directory looks like this:
When I run locally, I get the same kind of stack trace:
However, this configuration is valid per the GHA documentation, and the workflow runs successfully on GitHub.
actshould be resolving my action's main script to/github/workspace/.github/actions/auth0-deploy/dist/index.js, instead of just/github/workspace/dist/index.js.@github-actions[bot] commented on GitHub (Aug 23, 2020):
Issue is stale and will be closed in 7 days unless there is new activity
@JerkyTreats commented on GitHub (Sep 14, 2020):
Can this be reopened? I've confirmed this use case breaks for me:
Gets
Error: open /path/to/users/pwd/.github/actions/foo/action.yaml: no such file or directoryshould resolve to
github/workspace/.github/actions/foo/action.yaml