Aaron Franke
Aaron Franke

Reputation: 4062

How do I add a path in the home directory in GitHub Actions CI?

I'm following this documentation article and at the moment I have this code:

echo '::add-path::$HOME/.local/bin'

However, this doesn't work. I tried both single and double quotes. My only guess is that it doesn't like $HOME, but I would really like to avoid hard-coding /home/runner to be home directory agnostic.

Is there a way to add a local path in GitHub Actions?

Upvotes: 8

Views: 11742

Answers (1)

Samira
Samira

Reputation: 9761

It seems to work just fine

- run: |
       mkdir -p $HOME/.local/bin
       cp $(which ls) $HOME/.local/bin/lets-see
       echo ::add-path::$HOME/.local/bin
- run: lets-see -a

Upvotes: 8

Related Questions