gha: use sudo -E in some places to prevent dropping env-vars

Using `-E` preserves environment variables, except for PATH, so PATH has to be
manually set to match the current environment.

I removed env-vars that were redundant (such as `GOPATH=$GOPATH`), which should
be handled by `-E`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2020-11-17 10:29:38 +01:00
parent 93a602a8bf
commit c1d1edbad9
2 changed files with 12 additions and 12 deletions

View File

@@ -132,7 +132,7 @@ jobs:
RUNC_FLAVOR: runc
run: |
if [[ "${OS}" == "linux" ]]; then
sudo PATH=$PATH script/setup/install-seccomp
sudo -E PATH=$PATH script/setup/install-seccomp
fi
make cri-cni-release
working-directory: src/github.com/containerd/containerd