-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem executing actions in versions over 1.5.1 #102
Comments
Heyo, thanks for the detailed info! I am checking into this a bit now. Do you by chance have a public repo that can be used to reproduce this error? |
I think I found part of the problem. It's based on the structure of the action repository. Originally I built this tool to support the structure in the TypeScript and JavaScript action templates. They both look like the following:
However it looks like your repo looks more like this...
When Next, it looks for the I should be able to set this up to instead traverse the directory structure from the entrypoint ( |
Ref #102 Depending on the structure of the action repository, the `node_modules` and `package.json` needed by `local-action` may not exist in the expected locations. This PR updates the behavior of the action to instead walk the directory structure and attempt to locate the paths more dynamically, allowing support for more customized action repositories.
Just published version 2.1.2 of this tool :) Can you give that a try? |
Hello, sorry for not answer, i develop múltiples actions in same repo, maybe i can try to
make you an screenshot of the project structure,
Good night from Spain
But the structure seems like this.
.
├── .github
│ └── actions
│ └── validate-sgon
│ │ └── action.yml
│ │ └── index.js
│ │ └── sourcemap
│ └── action2
│ │ └── action.yml
│ │ └── index.js
│ │ └── sourcemap
│ └── action3
│ └── action.yml
│ └── index.js
│ └── sourcemap
└── src
└── main
└── actions
└── validateSgonAction.ts
└── action2.ts
└── action3.ts
└── action4.ts
El vie, 27 sept 2024, 17:38, Nick Alteen ***@***.***>
escribió:
… Closed #102 <#102> as
completed.
—
Reply to this email directly, view it on GitHub
<#102 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF2OVLTLEWJUEKWTHSXYJVTZYV3YLAVCNFSM6AAAAABNV4ZRIGVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGQZTGMBVHEYTKMQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
node version 18 or 20
typescript version 4.9.5
@github/local-action >2.0.0
When I try to execute an action un version >=2.0.0
for example local-action run .github\actions\validate-sgon ../../../src/main/actions/validateSgonAction.ts .env
node:fs:453
return binding.readFileUtf8(path, stringToFlags(options.flag));
^
Error: ENOENT: no such file or directory, open 'C:\Users\x648580\NodeProjects\gln-api-orchestator-manager-action.github\actions\validate-sgon\package.json'
at Object.readFileSync (node:fs:453:20)
at isESM (c:\Users\x648580\AppData\Roaming\npm\node_modules@github\local-action\src\utils\package.ts:11:8)
at action (c:\Users\x648580\AppData\Roaming\npm\node_modules@github\local-action\src\commands\run.ts:95:7)
at Command. (c:\Users\x648580\AppData\Roaming\npm\node_modules@github\local-action\src\command.ts:112:7) {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\Users\x648580\NodeProjects\gln-api-orchestator-manager-action\.github\actions\validate-sgon\package.json'
}
BUT when i downgrade to @github/local-action 1.5.1 Its WORK!
My code was compiled with ncc :
"build:sgon": "ncc build --source-map -o .github/actions/validate-sgon src/main/actions/validateSgonAction.ts",
if you need more evidence, im really happy to help us!
The text was updated successfully, but these errors were encountered: