-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Can't find node in PATH, trying to find a node binary on your system #18
Comments
Hi Emilien, Thanks for the detailed issue! I first have to test, if and how we could switch to a Docker image that supports both In the meantime you should be able to disable the hooks by passing - name: Commit changed files
uses: stefanzweifel/[email protected]
with:
commit_message: 📦 Build dist
branch: master
+ commit_options: '--no-verify'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Thanks for your answers, I have made a test without husky and it work perferctly : https://github.com/Kamiapp-fr/kami-collection/commit/2fc3c2a5775a3ab70e3528f4309f1c72c8ad2181/checks?check_suite_id=331010381 |
Great! |
Please consider rewrite this action using js, so that CLI tools in the host environment can be used. As easy as a .js file as entry and a shell script. See https://github.com/ad-m/github-push-action |
A rewrite in JS/TS has been on my mind lately. (Would like to have a test suite to make sure everything works as expected). Thanks for the link. Will checkout if we can do something similar in this Action. |
I've made some first attempts of an easy rewrite in JS as mentioned by @zhangyoufu here: https://github.com/stefanzweifel/git-auto-commit-action/blob/86f0c11c06a83f9b92c87e0111b1b8f9037a77bd/index.js However, using the updated Action in a demo results in a broken Workflow (See log here) My bandwith is quite limited right know and I think the Action works for 80% of the usecases. I've written more thought on a JavaScript rewrite in #44. I might revisit the idea of a JS rewrite in 2-3 months. |
You're invoking git-auto-commit-action/index.js Lines 18 to 20 in 86f0c11
I think change git-auto-commit-action/entrypoint.sh Lines 30 to 32 in 86f0c11
|
@zhangyoufu Thanks. Will give it a try later this week. |
Thanks @zhangyoufu for the help. Your suggestion solved the issues. I would appreciated it if any of you would test the changes in your projects before I merge and release a new major version. Update your workflow files to use the PR branch like this. - - uses: stefanzweifel/[email protected]
+ - uses: stefanzweifel/git-auto-commit-action@refactor/switch-to-js Please leave your feedback in the PR #45. |
I have tried with the js version. Husky work well but i get an error for the commit. My config file: name: Build
on:
push:
branches:
- master
- test/pre-commit
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install
run: npm install
- name: build
run: npm run build
- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@refactor/switch-to-js
with:
commit_message: 📦 Build dist
branch: test/pre-commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }} |
The error comes from a breaking change we made in
name: Build
on:
push:
branches:
- master
- test/pre-commit
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install
run: npm install
- name: build
run: npm run build
- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@refactor/switch-to-js
with:
commit_message: 📦 Build dist
branch: test/pre-commit
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }} |
It's work better with a good configuration ;) Thanks you for your help 😄 |
@EmilienLeroy Great! I will merge this PR and release a new major version (4.0.0) very soon. I keep you updated through this issue. |
@EmilienLeroy v4.0.0 has been released: https://github.com/stefanzweifel/git-auto-commit-action/releases/tag/v4.0.0 Update your workflow file to use the latest version. - name: Commit changed files
- uses: stefanzweifel/git-auto-commit-action@refactor/switch-to-js
+ uses: stefanzweifel/[email protected]
with: |
Version of the Action
v2.3.0
Describe the bug
I use husky to run lint before commit. An error appear when the action is call, i think is due to the pre commit.
To Reproduce
This my configuration :
And i run this during the pre commit :
Expected behavior
Run the pre commit before commit without error.
Screenshots
https://github.com/Kamiapp-fr/kami-collection/runs/322604011
The text was updated successfully, but these errors were encountered: