omit sudo when EUID eqto 0
Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> omit sudo when EUID eqto 0 Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> omit sudo when EUID eqto 0 Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> omit sudo when EUID eqto 0 Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> use gosu to omit sudo in GA Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> use gosu to omit sudo in GA Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> set working-dir for <<Setup gosu>> step Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> fix job permissions Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>
This commit is contained in:
parent
7d7104c549
commit
24b331ad1e
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -269,6 +269,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: '1.13.10'
|
go-version: '1.13.10'
|
||||||
|
|
||||||
|
- name: Setup gosu
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
GOSU=/usr/local/bin/gosu
|
||||||
|
arch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"
|
||||||
|
sudo wget -O ${GOSU} "https://github.com/tianon/gosu/releases/download/1.12/gosu-$arch"
|
||||||
|
sudo chmod +x ${GOSU}
|
||||||
|
sudo chown root ${GOSU}
|
||||||
|
sudo chmod +s ${GOSU}
|
||||||
|
|
||||||
- name: Set env
|
- name: Set env
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -285,7 +295,7 @@ jobs:
|
|||||||
RUNC_FLAVOR: ${{ matrix.runc }}
|
RUNC_FLAVOR: ${{ matrix.runc }}
|
||||||
run: |
|
run: |
|
||||||
sudo PATH=$PATH script/setup/install-seccomp
|
sudo PATH=$PATH script/setup/install-seccomp
|
||||||
script/setup/install-runc
|
gosu root script/setup/install-runc
|
||||||
script/setup/install-cni
|
script/setup/install-cni
|
||||||
script/setup/install-critools
|
script/setup/install-critools
|
||||||
working-directory: src/github.com/containerd/containerd
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
@ -27,13 +27,13 @@ function install_runc() {
|
|||||||
cd "$GOPATH"/src/github.com/opencontainers/runc
|
cd "$GOPATH"/src/github.com/opencontainers/runc
|
||||||
git checkout $RUNC_COMMIT
|
git checkout $RUNC_COMMIT
|
||||||
make BUILDTAGS='apparmor seccomp selinux' runc
|
make BUILDTAGS='apparmor seccomp selinux' runc
|
||||||
sudo make install
|
make install
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_crun() {
|
function install_crun() {
|
||||||
CRUN_VERSION=0.11
|
CRUN_VERSION=0.11
|
||||||
sudo curl -o /usr/local/sbin/runc -L https://github.com/containers/crun/releases/download/${CRUN_VERSION}/crun-${CRUN_VERSION}-static-$(uname -m)
|
curl -o /usr/local/sbin/runc -L https://github.com/containers/crun/releases/download/${CRUN_VERSION}/crun-${CRUN_VERSION}-static-$(uname -m)
|
||||||
sudo chmod +x /usr/local/sbin/runc
|
chmod +x /usr/local/sbin/runc
|
||||||
}
|
}
|
||||||
|
|
||||||
: ${RUNC_FLAVOR=runc}
|
: ${RUNC_FLAVOR=runc}
|
||||||
|
Loading…
Reference in New Issue
Block a user