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

Error on runtime: /entrypoint.sh: line 7: sh: not found #269

Closed
SzymonRysztof opened this issue Sep 18, 2023 · 2 comments
Closed

Error on runtime: /entrypoint.sh: line 7: sh: not found #269

SzymonRysztof opened this issue Sep 18, 2023 · 2 comments

Comments

@SzymonRysztof
Copy link

Hi,
I'm trying to setup ssh workflow based on this action, but sadly, when it comes to step that is supposed to login to my host via ssh, I'm receiving
/entrypoint.sh: line 7: sh: not found
error
It looks like action is building and then using docker container which has ssh client, but it looks like somehow base image does not have sh installed.

This is my step:

steps:
      - name: Deploy develop
        env:
          PATH: ***
          COMPOSE_FILE: ***
          RELEASE: ***
        uses: appleboy/[email protected]
        if: github.ref == 'refs/heads/develop'
        with:
          envs: PATH,COMPOSE_FILE,RELEASE
          host: secret
          username: secret
          key: secret
          port: secret
          script: |
            cd $PATH
            git pull
            docker-compose -f $COMPOSE_FILE pull
            docker-compose -f $COMPOSE_FILE up -d

But i think my config is irrelevant since it looks like base image problem (since it fails on entrypoint with sh not being available)

Is there something that i'm missing? Or what steps can i take to investigate it more (if somehow error is on my part)?

@SkvSerega
Copy link

SkvSerega commented May 16, 2024

@SzymonRysztof I think this problem is due to the fact that you are substituting the PATH variable that is passed to the Github Action. This variable is occupied by the operating system and that's why you get this error.

@appleboy
Copy link
Owner

appleboy commented Jun 1, 2024

@SkvSerega Thank you for your explanation.

@SzymonRysztof
If you continue to encounter the same issue, please reopen this issue.

@appleboy appleboy closed this as completed Jun 1, 2024
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

No branches or pull requests

3 participants