mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
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/
This commit is contained in:
parent
782013564e
commit
b710f9c5d5
@ -104,7 +104,7 @@ function ciCommandAddPath {
|
||||
if isAzurePipelines; then
|
||||
echo "##vso[task.prependpath]${path}"
|
||||
elif isGitHubActions; then
|
||||
echo "::add-path::${path}"
|
||||
echo "${path}" >> "${GITHUB_PATH}"
|
||||
else
|
||||
echo "ciCommandAddPath only works inside CI!"
|
||||
exit 1
|
||||
@ -122,7 +122,7 @@ function ciCommandSetEnv {
|
||||
if isAzurePipelines; then
|
||||
echo "##vso[task.setvariable variable=${name}]${value}"
|
||||
elif isGitHubActions; then
|
||||
echo "::set-env name=${name}::${value}"
|
||||
echo "${name}=${value}" >> "${GITHUB_ENV}"
|
||||
else
|
||||
echo "ciCommandSetEnv only works inside CI!"
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user