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 "/bin/entrypoint.sh: line 7: sh: not found" when I am using Github Environments #178

Open
shir0fu opened this issue May 15, 2024 · 0 comments

Comments

@shir0fu
Copy link

shir0fu commented May 15, 2024

Hi!

When I use Github environments in my deploy script, I get a "command not found" error. I add the following code to my script:

      - name: Set PATH environment variable
        run: echo "PATH=\$PATH:/bin" >> $GITHUB_PATH

This solved my problem in particular. Now I can use ls command (for example) without errors, but when script runs code with appleboy/scp-action@master (or other version) I had an error /bin/entrypoint.sh: line 7: sh: not found

This is my complete .yml script

jobs:
  DEV:
    runs-on: ubuntu-latest
    environment: DEV
    steps:

      - name: Set PATH environment variable
        run: echo "PATH=\$PATH:/bin" >> $GITHUB_PATH
    
      - uses: thaind0/envfile@v1
        with:
          secrets: ${{ toJSON(secrets) }}
          file: temp.env 
      - run: |
          echo $GITHUB_PATH
          pwd
          ls -la

      - name: copy file via ssh key
        uses: appleboy/scp-action@master
        with:
          host: ${{ secrets.HOST }}
          username: username
          port: 22
          key: ${{ secrets.DEV_SSHKEY }}
          source: temp.env
          target: ${{ secrets.PATH }}

How can I fix this error or I need to wait for the problem to be resolved on the appleboy/scp-action@master side?
@appleboy

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

1 participant