Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set system path variable in github action workflow

I was wondering how I can set the system path variables in the GitHub actions workflow.

export "$PATH:$ANYTHING/SOMETHING:$AA/BB/bin"

1 Answers

You can use the following run command to set a system path variable in your actions workflow.

Syntax:

echo "{path}" >> $GITHUB_PATH
- run: |
   echo "$AA/BB/bin" >> $GITHUB_PATH

Additionally, if you have downloaded some binaries and trying to set its path, GitHub uses a special directory called $GITHUB_WORKSPACE as your current directory. You may need to specify this variable in your path in that case.

- run: |
   echo "$GITHUB_WORKSPACE/BB/bin" >> $GITHUB_PATH
like image 124
Robin Raju Avatar answered Sep 10 '25 06:09

Robin Raju