Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 779
Aaron Franke Avatar asked Jul 14 '20 08:07

Aaron Franke


1 Answers

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
like image 195
Samira Avatar answered Oct 02 '22 17:10

Samira