I was wondering how I can set the system path variables in the GitHub actions workflow.
export "$PATH:$ANYTHING/SOMETHING:$AA/BB/bin"
I was wondering how I can set the system path variables in the GitHub actions workflow.
export "$PATH:$ANYTHING/SOMETHING:$AA/BB/bin"
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
If you are using Bash shell
- name: Add to PATH
shell: bash
run: |
echo "Folder PATH" >> $GITHUB_PATH
For Powershell as a shell:
- name: Add to PATH
shell: pwsh
run: |
echo "Folder PATH" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
© 2022 - 2024 — McMap. All rights reserved.