-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: Switching the action from docker into composite #42
feat: Switching the action from docker into composite #42
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @crisperit , I'm so sorry this is taking so long, I'm caught up in different projects.
Your PR looks good! I was thinking that it was not necessary to completely remove the entrypoint.sh
file though, you could just leave it as is and call it via the composite action if I'm not mistaken. It would make for a way simpler action.yml file and much less diff in the pull request ;)
it would also allow to make the .sh file "testable" if we ever decide/need to add unit testing
action.yml
Outdated
- name: "Install node through NVM if needed" | ||
shell: bash | ||
run: | | ||
if [[ "${{ inputs.use_nvm }}" == "true" ]] && ([[ -n "${{ inputs.node_version }}" ]] || [[ -e ".nvmrc" ]]) | ||
then | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash | ||
[ -s "$HOME/.nvm/nvm.sh" ] && \. "$HOME/.nvm/nvm.sh" | ||
if [[ -n "${{ inputs.node_version }}" ]] | ||
then | ||
nvm install "${{ inputs.node_version }}" | ||
else | ||
nvm install | ||
fi | ||
else | ||
echo "Node installation has been omitted" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not necessary anymore 😉
since we have a composite action, users are free to use actions/setup-node to setup whatever version they need, and our action should run with that version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok - removed
c5522c3
to
25f9410
Compare
Done - I've returned entrypoint.sh |
@crisperit looks amazing! Sorry again for the delay! I'm gonna go ahead and release a major version, thanks a lot for all the work you put in! If you'd like you can add your name to the README as well in another PR |
@jsmrcaga Here is the another approach - to use already installed netlify-cli
The time difference is pretty the same as with the prepared specially docker image - but it might be easier to maintain that's why I like that version more
I've tested that action only with a scenario of not having to run nvm, install step or build step
@jsmrcaga You can try to test it more
Fixes #35