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

[BUG] Fatal: $HOME not set #708

Closed
2 tasks done
alfred-stokespace opened this issue Oct 25, 2022 · 8 comments
Closed
2 tasks done

[BUG] Fatal: $HOME not set #708

alfred-stokespace opened this issue Oct 25, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@alfred-stokespace
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

Run bash $GITHUB_ACTION_PATH/get-changed-paths.sh
  bash $GITHUB_ACTION_PATH/get-changed-paths.sh
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    GITHUB_WORKSPACE: /actions-runner/_work/REDACTED-REDACTED/REDACTED-REDACTED
    GITHUB_BASE_REF: main
    INPUT_FILES_PATTERN_FILE: /tmp/0658cf4a-97a5-4014-9815-d0efe86936c9.txt
    INPUT_SEPARATOR:  
    INPUT_PATH: .
    INPUT_PREVIOUS_SHA: dc96ac7ba9ca0443172c39b0d5bd545771927b52
    INPUT_CURRENT_SHA: db2490a6da9b81898355bce5389548cbd9e1492d
    INPUT_TARGET_BRANCH: main
    INPUT_CURRENT_BRANCH: feat/live-streaming-documentation
    INPUT_QUOTEPATH: true
    INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES: false
    INPUT_OLD_NEW_SEPARATOR: ,
    INPUT_OLD_NEW_FILES_SEPARATOR:  
    INPUT_DIFF_RELATIVE: 
    INPUT_DIR_NAMES: false
    INPUT_JSON: false
    INPUT_HAS_CUSTOM_PATTERNS: false
fatal: $HOME not set
Error: Process completed with exit code 128.

To Reproduce

  1. I'm running on an enterprise GH instance 3.5
  2. I have a simple action copied from your example.
    - name: Get changed files
         id: changed-files
        uses: tj-actions/changed-files@v33
    
  3. When I try to trigger your action from a
      pull_request:
          types: [opened, reopened]
    

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-20.04

Expected behavior?

Should have counted the files changed on my branch

Relevant log output

Run bash $GITHUB_ACTION_PATH/get-changed-paths.sh
  bash $GITHUB_ACTION_PATH/get-changed-paths.sh
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    GITHUB_WORKSPACE: /actions-runner/_work/REDACTED-REDACTED/REDACTED-REDACTED
    GITHUB_BASE_REF: main
    INPUT_FILES_PATTERN_FILE: /tmp/0658cf4a-97a5-4014-9815-d0efe86936c9.txt
    INPUT_SEPARATOR:  
    INPUT_PATH: .
    INPUT_PREVIOUS_SHA: dc96ac7ba9ca0443172c39b0d5bd545771927b52
    INPUT_CURRENT_SHA: db2490a6da9b81898355bce5389548cbd9e1492d
    INPUT_TARGET_BRANCH: main
    INPUT_CURRENT_BRANCH: feat/live-streaming-documentation
    INPUT_QUOTEPATH: true
    INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES: false
    INPUT_OLD_NEW_SEPARATOR: ,
    INPUT_OLD_NEW_FILES_SEPARATOR:  
    INPUT_DIFF_RELATIVE: 
    INPUT_DIR_NAMES: false
    INPUT_JSON: false
    INPUT_HAS_CUSTOM_PATTERNS: false
fatal: $HOME not set
Error: Process completed with exit code 128.


### Anything else?

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@alfred-stokespace alfred-stokespace added the bug Something isn't working label Oct 25, 2022
@github-actions
Copy link
Contributor

Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience.

@alfred-stokespace
Copy link
Author

The runner OS isn't ubuntu, it's Amazon Linux 2 "centos rhel fedora"

@jackton1
Copy link
Member

jackton1 commented Oct 25, 2022

@alfred-stokespace Given that the error is likely a misconfiguration. I'll suggest you take a look at https://docs.github.com/en/enterprise-server@3.2/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-aws#hardware-considerations, particularly noting that the AMI ID is correct.

@jackton1 jackton1 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2022
@alfred-stokespace
Copy link
Author

@jackton1 we have a ubuntu runner on site, are you suggesting I try that?

@alfred-stokespace
Copy link
Author

hmm... I guess I took this as a suggestion runs-on: ubuntu-latest # windows-latest | macos-latest
I'll give this a try on our ubuntu runner.

@alfred-stokespace
Copy link
Author

Running on ubuntu didn't fix the issue,
this did...
echo "HOME=$(pwd)" >> $GITHUB_ENV

like below

echo "HOME=$(pwd)" >> $GITHUB_ENV
  cat /etc/os-release
  shell: /usr/bin/bash -e {0}
NAME="Ubuntu"
VERSION="20.0[4](https://REDACTED/runs/28849?check_suite_focus=true#step:3:4).4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
....

@jackton1
Copy link
Member

jackton1 commented Oct 25, 2022

The question would be why isn't the HOME env set on the box, you can take a look at the post generation script here pending when you are able to trace the issue.

@PLQin
Copy link

PLQin commented Nov 23, 2023

set:

export HOME="/home/ubuntu"

or

export HOME="/home/root"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants