Skip to content

Commit b710f9c

Browse files
committed
ci: switch to environment files to change the environment on GHA
See GitHub's blog post on why the change was necessary: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
1 parent 7820135 commit b710f9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ci/shared.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function ciCommandAddPath {
104104
if isAzurePipelines; then
105105
echo "##vso[task.prependpath]${path}"
106106
elif isGitHubActions; then
107-
echo "::add-path::${path}"
107+
echo "${path}" >> "${GITHUB_PATH}"
108108
else
109109
echo "ciCommandAddPath only works inside CI!"
110110
exit 1
@@ -122,7 +122,7 @@ function ciCommandSetEnv {
122122
if isAzurePipelines; then
123123
echo "##vso[task.setvariable variable=${name}]${value}"
124124
elif isGitHubActions; then
125-
echo "::set-env name=${name}::${value}"
125+
echo "${name}=${value}" >> "${GITHUB_ENV}"
126126
else
127127
echo "ciCommandSetEnv only works inside CI!"
128128
exit 1

0 commit comments

Comments
 (0)