Skip to content
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

Fix path for local node12 actions #371

Merged
merged 2 commits into from
Sep 29, 2020
Merged

Conversation

jromero
Copy link
Contributor

@jromero jromero commented Sep 25, 2020

This changes makes it so that the proper path is used when executing a local javascript (node12) action.

Additional minor changes:

  • Updated Makefile
    • Updated make test to be functional by running expected go test task based on README.md
    • Added make format to format based on CONTRIBUTING.md
    • Made GITHUB_TOKEN be set only once instead of re-executing cat per target.
  • Update expression_tests to retain previous behaviour (when no file matched) now that a package-lock.json file exists in testdata.

Fixes #185

@jromero jromero requested a review from cplee as a code owner September 25, 2020 17:05
@jromero
Copy link
Contributor Author

jromero commented Sep 28, 2020

The changes here are minimal but the PR looks huge because of the node_modules. I can try making the testdata action a compiled version via ncc if that's desired.

@cplee
Copy link
Contributor

cplee commented Sep 28, 2020

@jromero - i'd rather not have the node_modules in the repo. can we come up with another option for this?

@jromero
Copy link
Contributor Author

jromero commented Sep 28, 2020

@jromero - i'd rather not have the node_modules in the repo. can we come up with another option for this?

Yup I can compile it as mentioned above. Given that this is more or less a static javascript app the concern of having to update it via compilation seems very minimal.

I'll update the PR and squash it.

@jromero
Copy link
Contributor Author

jromero commented Sep 28, 2020

@cplee updated. Let me know what you think.

Copy link
Contributor

@cplee cplee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome @jromero 🎉

@cplee cplee merged commit 729adec into nektos:master Sep 29, 2020
taliesins added a commit to taliesins/act that referenced this pull request Oct 8, 2020
cplee pushed a commit that referenced this pull request Oct 9, 2020
* When running on Windows the correct path separator must be used. filePath.join is OS aware, so when we want to use forward slash use path.join instead.

on windows docker cp should end with \. when copying a directory
when running npm modules we should pass in path with all forward slashes

This fixes #331

* When calculating relative folders on Windows for destination path on Linux, we need to change \ for /

* Reduce complexity by extracting methods

* V1 does not point to a file that does not exist

* Looks like something else is the cause of this test breaking. Last successful build is #371, builds after that are failing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

local js action fails (uses: ./)
2 participants